om Singh:
@Mumshad Mannambeth @Fernando Jordan Silva I have installed kubectl on my laptop and From my master copied /root/.kube directory to my laptop C:\Users.kube location.
kubectl should pickup the certificate from config file automatically. but i am getting below error
kubectl get nodes
error: client-key-data or client-key must be specified for kubernetes-admin to use the clientCert authentication method.
Vijin Palazhi:
are these client certs accessible from your kubeconfig file? How are they configured?
Fernando Jordan Silva:
The path is not right. You have to place the file under c:/Users/<your user>/.kube.
om Singh:
@Fernando Jordan Silva the path is c:/Users/<your user>/.kube , sorry for the typo
om Singh:
@Vijin Palazhi they are plan text content put on kubeconfig
om Singh:
i guess here is the problem
cluster:
certificate-authority-data: DATA+OMITTED
om Singh:
name: kubernetes-admin
user:
client-certificate-data: REDACTED
Fernando Jordan Silva:
Also check the server address, if you are trying to access from outside, it must be the public ip of the server. Kubeadm creates the config using the private one.
om Singh:
i am trying to access from same network
om Singh:
so do we need public ip?
Fernando Jordan Silva:
No. Try using that Kubeconfig file in the control plane node to check if it’s valid.
Fernando Jordan Silva:
If it works, also you can create you own user (check docs) for external access. That user will have their own certificates
om Singh:
in control plane it working but from outside i am facing issues
Fernando Jordan Silva:
If the kubeconfig is working that means that the file is right and the info inside it also is right. I think that maybe can be the IP address of the control plane ( can you check with other ips? ) or maybe some kind of network issue
om Singh:
Thanks ,It was due to file error, i use scp to copy from master node to windows,now it works fine
om Singh:
i am trying to access my dashboard using below url
<http://localhost:8080/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard/proxy/>
but getting issue
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "services \"https\" not found",
"reason": "NotFound",
"details": {
"name": "https",
"kind": "services"
},
"code": 404
}
Fernando Jordan Silva:
did you started the proxy ?
Fernando Jordan Silva:
kubectl proxy