ashetty
Intern
Intern
  • UID7773
  • Fans0
  • Follows0
  • Posts1
Reads:3440Replies:2

[products]Unable to access kubernetes cluster over internet

Created#
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?






afzaalvirgoboy
Intern
Intern
  • UID6091
  • Fans0
  • Follows0
  • Posts15
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.

Jag
Jag
Intern
Intern
  • UID6348
  • Fans0
  • 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 &
Guest