# hostsubnet.yml apiVersion: v1 kind: HostSubnet metadata: name: f5-bigip-node01 annotations: pod.network.openshift.io/fixed-vnid-host: "0" pod.network.openshift.io/assign-subnet: "true" # provide a name for the node that will serve as BIG-IP's entry into the cluster host: f5-bigip-node01 # The hostIP address will be the BIG-IP interface address routable to the # OpenShift Origin nodes. # This address is the BIG-IP VTEP in the SDN's VXLAN. hostIP: 192.168.200.82 --- apiVersion: v1 kind: HostSubnet metadata: name: f5-bigip-node02 annotations: pod.network.openshift.io/fixed-vnid-host: "0" pod.network.openshift.io/assign-subnet: "true" # provide a name for the node that will serve as BIG-IP's entry into the cluster host: f5-bigip-node02 # The hostIP address will be the BIG-IP interface address routable to the # OpenShift Origin nodes. # This address is the BIG-IP VTEP in the SDN's VXLAN. hostIP: 192.168.200.83 --- apiVersion: v1 kind: HostSubnet metadata: name: f5-bigip-float annotations: pod.network.openshift.io/fixed-vnid-host: "0" pod.network.openshift.io/assign-subnet: "true" # provide a name for the node that will serve as BIG-IP's entry into the cluster host: f5-bigip-float # The hostIP address will be the BIG-IP interface address routable to the # OpenShift Origin nodes. # This address is the BIG-IP VTEP in the SDN's VXLAN. hostIP: 192.168.200.84
#deployment.yml apiVersion: extensions/v1beta1 kind: Deployment metadata: name: f5-bigip-ctlr-01 spec: replicas: 1 template: metadata: name: k8s-bigip-ctlr labels: app: k8s-bigip-ctlr spec: # Name of the Service Account bound to a Cluster Role with the required # permissions serviceAccountName: bigip-ctlr containers: - name: k8s-bigip-ctlr # replace the version as needed image: "f5networks/k8s-bigip-ctlr:1.5.1" env: - name: BIGIP_USERNAME valueFrom: secretKeyRef: # Replace with the name of the Secret containing your login # credentials name: bigip-login key: username - name: BIGIP_PASSWORD valueFrom: secretKeyRef: # Replace with the name of the Secret containing your login # credentials name: bigip-login key: password command: ["/app/bin/k8s-bigip-ctlr"] args: [ # See the k8s-bigip-ctlr documentation for information about # all config options # http://clouddocs.f5.com/products/connectors/k8s-bigip-ctlr/latest "--bigip-username=$(BIGIP_USERNAME)", "--bigip-password=$(BIGIP_PASSWORD)", "--bigip-url=192.168.200.82", "--bigip-partition=OpenShift", "--pool-member-type=cluster", "--openshift-sdn-name=/Common/openshift_vxlan", '--manage-routes=true', '--route-vserver-addr=192.168.200.80' ] imagePullSecrets: # Secret containing the BIG-IP system login credentials - name: bigip-login
---
apiVersion: extensions/v1beta1 kind: Deployment metadata: name: f5-bigip-ctlr-02 spec: replicas: 1 template: metadata: name: k8s-bigip-ctlr labels: app: k8s-bigip-ctlr spec: # Name of the Service Account bound to a Cluster Role with the required # permissions serviceAccountName: bigip-ctlr containers: - name: k8s-bigip-ctlr # replace the version as needed image: "f5networks/k8s-bigip-ctlr:1.5.1" env: - name: BIGIP_USERNAME valueFrom: secretKeyRef: # Replace with the name of the Secret containing your login # credentials name: bigip-login key: username - name: BIGIP_PASSWORD valueFrom: secretKeyRef: # Replace with the name of the Secret containing your login # credentials name: bigip-login key: password command: ["/app/bin/k8s-bigip-ctlr"] args: [ # See the k8s-bigip-ctlr documentation for information about # all config options # http://clouddocs.f5.com/products/connectors/k8s-bigip-ctlr/latest "--bigip-username=$(BIGIP_USERNAME)", "--bigip-password=$(BIGIP_PASSWORD)", "--bigip-url=192.168.200.83", "--bigip-partition=OpenShift", "--pool-member-type=cluster", "--openshift-sdn-name=/Common/openshift_vxlan", '--manage-routes=true', '--route-vserver-addr=192.168.200.80' ] imagePullSecrets: - name: bigip-login
1
oc create -f deployment.yml
查看BIG-IP Controller的部署进度
1 2 3 4
[root@master01 ~]# oc get pod NAME READY STATUS RESTARTS AGE f5-bigip-ctlr-01-7f44695b97-lmwdh 1/1 Running 0 17h f5-bigip-ctlr-02-54df674f58-j2x26 1/1 Running 0 17h