Closed fsampaio closed 7 years ago
What version of k8s-bigip-ctlr were you using? k8s-bigip-ctlr supports BIG-IP version 11.6.X.
@fsampiao - can you attach your deployment configuration for the controller? There are details on gathering that info here: https://support.f5.com/csp/article/K60974137
Hi @edarzins
This is the version, Docker image: k8s-bigip-ctlr:
REPOSITORY TAG
f5networks/k8s-bigip-ctlr 1.1.0-beta.1
@rsalsa This is my deployment configuration:
fsampaio@sagan:~/workspace/kubernetes/f5$ kubectl get deployment k8s-bigip-ctlr-deployment --namespace kube-system -o yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: deployment.kubernetes.io/revision: "6" kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"extensions/v1beta1","kind":"Deployment","metadata":{"annotations":{},"name":"k8s-bigip-ctlr-deployment","namespace":"kube-system"},"spec":{"replicas":1,"template":{"metadata":{"labels":{"app":"k8s-bigip-ctlr"},"name":"k8s-bigip-ctlr"},"spec":{"containers":[{"args":["--bigip-username=$(BIGIP_USERNAME)","--bigip-password=$(BIGIP_PASSWORD)","--bigip-url=dhc-bip.servers","--bigip-partition=kubernetes","--namespace=default"],"command":["/app/bin/k8s-bigip-ctlr"],"env":[{"name":"BIGIP_USERNAME","valueFrom":{"secretKeyRef":{"key":"username","name":"bigip-login"}}},{"name":"BIGIP_PASSWORD","valueFrom":{"secretKeyRef":{"key":"password","name":"bigip-login"}}}],"image":"f5networks/k8s-bigip-ctlr:1.1.0-beta.1","imagePullPolicy":"IfNotPresent","name":"k8s-bigip-ctlr"}]}}}} creationTimestamp: 2017-07-18T17:09:58Z generation: 6 labels: app: k8s-bigip-ctlr name: k8s-bigip-ctlr-deployment namespace: kube-system resourceVersion: "468256" selfLink: /apis/extensions/v1beta1/namespaces/kube-system/deployments/k8s-bigip-ctlr-deployment uid: ed4214a4-6bdb-11e7-b477-00505699514c spec: replicas: 1 selector: matchLabels: app: k8s-bigip-ctlr strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: creationTimestamp: null labels: app: k8s-bigip-ctlr name: k8s-bigip-ctlr spec: containers:
fsampaio@sagan:~/workspace/kubernetes/f5$ kubectl get service my-frontend -o yaml apiVersion: v1 kind: Service metadata: creationTimestamp: 2017-07-18T18:09:11Z labels: run: my-frontend name: my-frontend namespace: default resourceVersion: "148739" selfLink: /api/v1/namespaces/default/services/my-frontend uid: 33861d4e-6be4-11e7-b477-00505699514c spec: clusterIP: 10.3.0.119 ports:
nodePort: 30449 port: 80 protocol: TCP targetPort: 80 selector: run: my-frontend sessionAffinity: None type: NodePort status: loadBalancer: {}
protocol: TCP targetPort: 80 selector: run: my-frontend sessionAffinity: None type: NodePort status: loadBalancer: {}
fsampaio@sagan:~/workspace/kubernetes/f5$ kubectl get configmap my-frontend -o yaml apiVersion: v1 data: data: |- { "virtualServer": { "frontend": { "balance": "round-robin", "mode": "http", "partition": "kubernetes", "virtualAddress": { "port": 80 } }, "backend": { "serviceName": "my-frontend", "servicePort": 80, "healthMonitors": [{ "interval": 30, "protocol": "http", "send": "HEAD / HTTP/1.0\r\n\r\n", "timeout": 91 }] } } } schema: f5schemadb://bigip-virtual-server_v0.1.3.json kind: ConfigMap metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"v1","data":{"data":"{\n \"virtualServer\": {\n \"frontend\": {\n \"balance\": \"round-robin\",\n \"mode\": \"http\",\n \"partition\": \"kubernetes\",\n \"virtualAddress\": {\n \"port\": 80\n }\n },\n \"backend\": {\n \"serviceName\": \"my-frontend\",\n \"servicePort\": 80,\n \"healthMonitors\": [{\n \"interval\": 30,\n \"protocol\": \"http\",\n \"send\": \"HEAD / HTTP/1.0\r\n\r\n\",\n \"timeout\": 91\n }]\n }\n }\n}","schema":"f5schemadb://bigip-virtual-server_v0.1.3.json"},"kind":"ConfigMap","metadata":{"annotations":{},"labels":{"f5type":"virtual-server"},"name":"my-frontend","namespace":"default"}} creationTimestamp: 2017-07-18T18:09:08Z labels: f5type: virtual-server name: my-frontend namespace: default resourceVersion: "148599" selfLink: /api/v1/namespaces/default/configmaps/my-frontend uid: 31c468d7-6be4-11e7-b477-00505699514c
fsampaio@sagan:~/workspace/kubernetes/f5$ kubectl logs -f k8s-bigip-ctlr-deployment-2919906783-k0kns -n kube-system 2017/07/20 18:29:27 [INFO] ConfigWriter started: 0xc420386120 2017/07/20 18:29:27 [INFO] Started config driver sub-process at pid: 14 2017/07/20 18:29:27 [INFO] NodePoller (0xc4203c3080) registering new listener: 0x405d70 2017/07/20 18:29:27 [INFO] NodePoller started: (0xc4203c3080) 2017/07/20 18:29:27 [INFO] ProcessNodeUpdate: Change in Node state detected 2017/07/20 18:29:27 [INFO] Wrote 0 Virtual Server configs 2017/07/20 18:29:27 [INFO] No virtual IP was specified for the virtual server my-frontend creating pool only. 2017/07/20 18:29:27 [INFO] Wrote 0 Virtual Server configs 2017/07/20 18:29:27 [INFO] Wrote 1 Virtual Server configs 2017/07/20 18:29:28 [INFO] [2017-07-20 18:29:28,751 main INFO] entering inotify loop to watch /tmp/k8s-bigip-ctlr.config942146449/config.json 2017/07/20 18:29:30 [ERROR] [2017-07-20 18:29:30,364 controller ERROR] Exception Error 2017/07/20 18:29:30 [INFO] Traceback (most recent call last): 2017/07/20 18:29:30 [INFO] File "/app/src/f5-cccl/f5_cccl/_f5.py", line 220, in regenerate_config_f5 2017/07/20 18:29:30 [INFO] self._apply_config(cfg) 2017/07/20 18:29:30 [INFO] File "/app/python/bigipconfigdriver.py", line 93, in _apply_config 2017/07/20 18:29:30 [INFO] CloudBigIP._apply_config(self, config['ltm']) 2017/07/20 18:29:30 [INFO] File "/app/src/f5-cccl/f5_cccl/_f5.py", line 308, in _apply_config 2017/07/20 18:29:30 [INFO] f5_healthcheck_dict = self.get_healthcheck_list(partition) 2017/07/20 18:29:30 [INFO] File "/app/src/f5-cccl/f5_cccl/_f5.py", line 847, in get_healthcheck_list 2017/07/20 18:29:30 [INFO] if hc.partition == partition and appService is None: 2017/07/20 18:29:30 [INFO] File "/usr/local/lib/python2.7/site-packages/f5/bigip/mixins.py", line 102, in getattr 2017/07/20 18:29:30 [INFO] raise AttributeError(error_message) 2017/07/20 18:29:30 [INFO] AttributeError: '<class 'f5.bigip.tm.ltm.monitor.Http'>' object has no attribute 'partition' 2017/07/20 18:29:30 [WARNING] [2017-07-20 18:29:30,365 main WARNING] regenerate operation failed, restarting 2017/07/20 18:29:30 [ERROR] [2017-07-20 18:29:30,365 main ERROR] Error applying config, will try again in 1 seconds
If I use the bigip with v13, works perfect.
In our testing with BIG-IP v11.6.0, we've run into similar issues (failure to find 'partition' attribute in 'f5.bigip.tm.ltm.monitor.http' object). This problem was fixed in BIG-IP v11.6.1 and is listed in the BIG-IP release notes here. Please upgrade to a newer version of BIG-IP (v11.6.1 or later).
After deploying the k8s-bigip-ctlr, I got the below error: Is this due to an incompatible bigip version?
BigIP Version: BIG-IP 11.6.0 Build 8.0.482 Hotfix HF8
2017/07/18 17:27:22 [INFO] ConfigWriter started: 0xc420396420 2017/07/18 17:27:22 [INFO] Started config driver sub-process at pid: 14 2017/07/18 17:27:22 [INFO] NodePoller (0xc4203ca680) registering new listener: 0x405d70 2017/07/18 17:27:22 [INFO] NodePoller started: (0xc4203ca680) 2017/07/18 17:27:22 [INFO] ProcessNodeUpdate: Change in Node state detected 2017/07/18 17:27:22 [INFO] Wrote 0 Virtual Server configs 2017/07/18 17:27:23 [INFO] [2017-07-18 17:27:23,874 main INFO] entering inotify loop to watch /tmp/k8s-bigip-ctlr.config490706250/config.json 2017/07/18 17:27:25 [ERROR] [2017-07-18 17:27:25,825 controller ERROR] Exception Error 2017/07/18 17:27:25 [INFO] Traceback (most recent call last): 2017/07/18 17:27:25 [INFO] File "/app/src/f5-cccl/f5_cccl/_f5.py", line 220, in regenerate_config_f5 2017/07/18 17:27:25 [INFO] self._apply_config(cfg) 2017/07/18 17:27:25 [INFO] File "/app/python/bigipconfigdriver.py", line 93, in _apply_config 2017/07/18 17:27:25 [INFO] CloudBigIP._apply_config(self, config['ltm']) 2017/07/18 17:27:25 [INFO] File "/app/src/f5-cccl/f5_cccl/_f5.py", line 308, in _apply_config 2017/07/18 17:27:25 [INFO] f5_healthcheck_dict = self.get_healthcheck_list(partition) 2017/07/18 17:27:25 [INFO] File "/app/src/f5-cccl/f5_cccl/_f5.py", line 847, in get_healthcheck_list 2017/07/18 17:27:25 [INFO] if hc.partition == partition and appService is None: 2017/07/18 17:27:25 [INFO] File "/usr/local/lib/python2.7/site-packages/f5/bigip/mixins.py", line 102, in getattr 2017/07/18 17:27:25 [INFO] raise AttributeError(error_message) 2017/07/18 17:27:25 [INFO] AttributeError: '<class 'f5.bigip.tm.ltm.monitor.Http'>' object has no attribute 'partition' 2017/07/18 17:27:25 [WARNING] [2017-07-18 17:27:25,825 main WARNING] regenerate operation failed, restarting 2017/07/18 17:27:25 [ERROR] [2017-07-18 17:27:25,825 main ERROR] Error applying config, will try again in 1 seconds