Package: kubernetes-client Version: 1.2.3+dfsg-1 Severity: important File: /usr/bin/kubectl
Hello there, thank you for providing kubernetes to Debian! There seems to be something missing, though, as I cannot connect to a GCE-backed cluster: | :) fernst@fernst:~$ /usr/bin/kubectl cluster-info -v42 | ERROR: logging before flag.Parse: I0529 15:57:47.661811 4945 loader.go:229] Config loaded from file /home/fernst/.kube/config | ERROR: logging before flag.Parse: I0529 15:57:47.662084 4945 round_trippers.go:267] curl -k -v -XGET -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.2.3+882d296 (linux/amd64) kubernetes/882d296" http://localhost:8080/api | ERROR: logging before flag.Parse: I0529 15:57:47.662802 4945 round_trippers.go:286] GET http://localhost:8080/api 404 Not Found in 0 milliseconds | ERROR: logging before flag.Parse: I0529 15:57:47.662813 4945 round_trippers.go:292] Response Headers: | ERROR: logging before flag.Parse: I0529 15:57:47.662820 4945 round_trippers.go:295] Server: nginx/1.10.0 | ERROR: logging before flag.Parse: I0529 15:57:47.662826 4945 round_trippers.go:295] Date: Sun, 29 May 2016 13:57:47 GMT | ERROR: logging before flag.Parse: I0529 15:57:47.662831 4945 round_trippers.go:295] Content-Type: text/html | ERROR: logging before flag.Parse: I0529 15:57:47.662837 4945 round_trippers.go:295] Connection: keep-alive | ERROR: logging before flag.Parse: I0529 15:57:47.662909 4945 request.go:870] Response Body: <html> | <head><title>404 Not Found</title></head> | <body bgcolor="white"> | <center><h1>404 Not Found</h1></center> | <hr><center>nginx/1.10.0</center> | </body> | </html> | ERROR: logging before flag.Parse: I0529 15:57:47.662971 4945 request.go:933] Response Body: <html> | <head><title>404 Not Found</title></head> | <body bgcolor="white"> | <center><h1>404 Not Found</h1></center> | <hr><center>nginx/1.10.0</center> | </body> | </html> | ERROR: logging before flag.Parse: I0529 15:57:47.663049 4945 round_trippers.go:267] curl -k -v -XGET -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.2.3+882d296 (linux/amd64) kubernetes/882d296" http://localhost:8080/apis | ERROR: logging before flag.Parse: I0529 15:57:47.663175 4945 round_trippers.go:286] GET http://localhost:8080/apis 404 Not Found in 0 milliseconds | ERROR: logging before flag.Parse: I0529 15:57:47.663197 4945 round_trippers.go:292] Response Headers: | ERROR: logging before flag.Parse: I0529 15:57:47.663202 4945 round_trippers.go:295] Server: nginx/1.10.0 | ERROR: logging before flag.Parse: I0529 15:57:47.663223 4945 round_trippers.go:295] Date: Sun, 29 May 2016 13:57:47 GMT | ERROR: logging before flag.Parse: I0529 15:57:47.663233 4945 round_trippers.go:295] Content-Type: text/html | ERROR: logging before flag.Parse: I0529 15:57:47.663239 4945 round_trippers.go:295] Connection: keep-alive | ERROR: logging before flag.Parse: I0529 15:57:47.663279 4945 request.go:870] Response Body: <html> | <head><title>404 Not Found</title></head> | <body bgcolor="white"> | <center><h1>404 Not Found</h1></center> | <hr><center>nginx/1.10.0</center> | </body> | </html> | ERROR: logging before flag.Parse: I0529 15:57:47.663332 4945 request.go:933] Response Body: <html> | <head><title>404 Not Found</title></head> | <body bgcolor="white"> | <center><h1>404 Not Found</h1></center> | <hr><center>nginx/1.10.0</center> | </body> | </html> | ERROR: logging before flag.Parse: F0529 15:57:47.663401 4945 helpers.go:107] error: failed to negotiate an api version; server supports: map[], client supports: map[batch/v1:{} componentconfig/v1alpha1:{} extensions/v1beta1:{} metrics/v1alpha1:{} v1:{} authorization.k8s.io/v1beta1:{} autoscaling/v1:{}] | :( fernst@fernst:~$ As you can see, it tries to retreive API data from localhost:8080, which my locally running nginx naturally cannot deliver. For some reason the cluster configuration as previously set via gcloud is completely ignored, and manually setting '--server' won't change anything at all, it still tries to connect to localhost. Verifying my config using upstream's 1.2.3 release yields not error, though: | :( fernst@fernst:~$ curl -sSL "http://storage.googleapis.com/kubernetes-release/release/v1.2.3/bin/linux/amd64/kubectl" > /home/fernst/bin/kubectl | :) fernst@fernst:~$ chmod +x /home/fernst/bin/kubectl | :) fernst@fernst:~$ /home/fernst/bin/kubectl cluster-info | Kubernetes master is running at https://123.45.67.89 | GLBCDefaultBackend is running at https://123.45.67.89/api/v1/proxy/namespaces/kube-system/services/default-http-backend | Heapster is running at https://123.45.67.89/api/v1/proxy/namespaces/kube-system/services/heapster | KubeDNS is running at https://123.45.67.89/api/v1/proxy/namespaces/kube-system/services/kube-dns | kubernetes-dashboard is running at https://123.45.67.89/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard | :) fernst@fernst:~$ /home/fernst/bin/kubectl cluster-info --v=42 2>&1 | grep curl | I0529 16:05:18.525850 16377 round_trippers.go:267] curl -k -v -XGET -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.2.3 (linux/amd64) kubernetes/882d296" -H "Authorization: Basic BASIC_AUTH" https://123.45.67.89/api | I0529 16:05:18.688118 16377 round_trippers.go:267] curl -k -v -XGET -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.2.3 (linux/amd64) kubernetes/882d296" -H "Authorization: Basic BASIC_AUTH" https://123.45.67.89/apis | I0529 16:05:18.721761 16377 round_trippers.go:267] curl -k -v -XGET -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.2.3 (linux/amd64) kubernetes/882d296" -H "Authorization: Basic BASIC_AUTH" https://123.45.67.89/api/v1/namespaces/kube-system/services?labelSelector=kubernetes.io%2Fcluster-service%3Dtrue | :) fernst@fernst:~$ (correct cluster IP replaced by 123.45.67.89 and basic auth replaced by BASIC_AUTH, even though the cluster has already long been decommissioned) BTW, upstream's v1.2.3 won't accept '-v42' ("Error: unknown shorthand flag: 'v' in -v42") as Debian's v1.2.3 does but insists on '--v=42' instead. Such differences between seemingly equal versions will raise eyebrows. Still, I'd expect kubectl to basically work. I might be missing some adjustment that Debian's version of kubectl needs to actually connect to GCE-backed clusters, yet I couldn't find anything. Thus, I'm filing this bug at "important", but please adjust as you see fit. Cheers, Flo -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (50, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.5.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages kubernetes-client depends on: ii libc6 2.22-9 kubernetes-client recommends no packages. kubernetes-client suggests no packages. -- no debconf information