I'm running kubernetes cluster in azure environment and I want to access kubernetes service apis from inside a pod container. But I cannot connect to https://kubernetes/ from inside a pod.
kubectl get services
NAME CLUSTER_IP EXTERNAL_IP PORT(S)
kubernetes 10.16.0.1 <none> 443/TCP
Even trying
curl -v --cacert /var/run/kubernetes/apiserver.crt https://10.16.0.1:443/api/v1/namespaces/default/pods
results in
- Trying 10.16.0.1...
- Connected to 10.16.0.1 (10.16.0.1) port 443 (#0)
- ALPN, offering http/1.1
- Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
- successfully set certificate verify locations:
- CAfile: /var/run/kubernetes/apiserver.crt CApath: /etc/ssl/certs
- TLSv1.2 (OUT), TLS header, Certificate Status (22):
- TLSv1.2 (OUT), TLS handshake, Client hello (1):
- Unknown SSL protocol error in connection to 10.16.0.1:443
- Closing connection 0 curl: (35) Unknown SSL protocol error in connection to 10.16.0.1:443
curl -k ...
(e.g. is it just the SSL verification that is failing)? – Robert Baileycurl -v -k https://kubernetes
but in azure environment kubernetes is not getting resolved to corresponding IP address. – Phagun Bayakubectl get endpoints
)? – Robert Bailey