• UID7773
  • Fans0
  • Follows0
  • Posts1

[products]Unable to access kubernetes cluster over internet

More Posted time:Jul 30, 2019 20:29 PM
I have created a Kubernets cluster win Container Service. I have enabled Use Public SLB to Expose API Server option so that I can run kubectl commands from my local machine. However I am unable to connect to the cluster API from my machine.
I get the following error when a connection attempt is made.
Unable to connect to the server: dial tcp XXX.YYY.FFF.XXX:6443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Do I need any additional steps?

Assistant Engineer
Assistant Engineer
  • UID6091
  • Fans2
  • Follows0
  • Posts52
1st Reply#
Posted time:Aug 1, 2019 6:12 AM
Most probably you have missed to configure the SLB to accept the requests, and forward to Kubernetes.

One thing that I can suggest is, if you are trying to access services and other resources from Kubernetes, try to check if you can at least connect to the Kubernetes cluster. This can help you rectify the problems in the network.

If that doesn't work, can you test the SLB with any other service? ECS, etc.

  • UID6348
  • Fans1
  • Follows0
  • Posts7
2nd Reply#
Posted time:Aug 2, 2019 11:24 AM
Try using proxy.
Make sure your API server is behind SSL or at least Self Signed cert

kubectl proxy --port=8080 &

  • UID8067
  • Fans1
  • Follows2
  • Posts51
3rd Reply#
Posted time:Sep 26, 2019 14:00 PM
Hello there.

Probably is a kubernetes context problem.
can you check if the right one?

kubectl config use-context your-cluster-name