Closed 344089386 closed 4 years ago
If you're talking about the KubeClientOptions.ApiEndPoint
property, that should be the Kubernetes API Endpoint which is different depending on which Kubernetes implementation you're deploying and how it's configured.
For k3s, port 6443 is the default, so whichever k3s node is your master the URL is https://k3s-master:6443
. On Azure AKS you'll see an api endpoint like: https://name-something.something.region.azmk8s.io:443
I think microk8s uses port 16443 by default.
Is that what you're looking for?
I decided to use native Kubernetes to avoid some mistakes. thank you.
The Kubernetes I'm using now, the ApiEndPoint is configured with an external 6443 address, and the AccessToken is a token generated by using these three lines of command: kubectl create serviceaccount dashboard-admin -n kube-system kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin kubectl describe secrets -n kube-system $(kubectl -n kube-system get secret | awk '/dashboard-admin/{print $1}')
Still report an error: One or more errors occurred. (由于目标计算机积极拒绝,无法连接。) One or more errors occurred. (Unable to connect due to active rejection of target computer.)
Please take a look at it for me, thank you
Are you able to connect to that host and port using curl
or telnet
? That error normally means that the port is not accessible at all...
@tintoy thank you That's exactly what you said, HTTP mapping is wrong, I'm mapping to node node, I should be mapping to master
I am not using native Kubernetes, but I have been reporting errors. I suspect there is something wrong with this address configuration. Could you give me some advice