kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.28k stars 4.87k forks source link

Using Multi-Control Plane - HA Clusters #19113

Closed ren-142326 closed 5 days ago

ren-142326 commented 3 months ago

minikube ssh -p ha-demo -- 'sudo /var/lib/minikube/binaries/v1.28.4/kubectl --kubeconfig=/var/lib/minikube/kubeconfig logs -n kube-system pod/kube-vip-ha-demo'

[sudo] password for docker:

where password?

victorguidi commented 3 months ago

As far as I can understand, I believe you are calling a ssh command and passing a shell command to be executed once it sshs in the machine. That command is using sudo, which is the "admin" password to use commands that do not belong to the current user. Try using it the sudo password that is configured on the machine you ssh into, that it should work.

ren-142326 commented 3 months ago

As far as I can understand, I believe you are calling a ssh command and passing a shell command to be executed once it sshs in the machine. That command is using sudo, which is the "admin" password to use commands that do not belong to the current user. Try using it the sudo password that is configured on the machine you ssh into, that it should work.

I use wsl, I tried to use the root account password I set up, it doesn't work,

victorguidi commented 3 months ago

I see it, but what I meant was to to use the sudo password configured where the HA Cluster was configured, the ha-demo server I believe, have you tried this one too?

If this dont work, would be great if you provide some more info and logs of the steps you are executing

prezha commented 1 week ago

hi @ren-142326 instead of v1.28.4 from the example, please use the kubernetes version that you installed your cluster with - you can find out Version from the profile command - eg:

minikube profile list

|---------|-----------|------------|----------------|------|---------|---------|-------|----------------|--------------------|
| Profile | VM Driver |  Runtime   |       IP       | Port | Version | Status  | Nodes | Active Profile | Active Kubecontext |
|---------|-----------|------------|----------------|------|---------|---------|-------|----------------|--------------------|
| ha-demo | docker    | containerd | 192.168.49.254 | 8443 | v1.31.1 | OKHAppy |     3 |                | *                  |
|---------|-----------|------------|----------------|------|---------|---------|-------|----------------|--------------------|

btw, pr #19722 aims to improve the docs and use the appropriate kubernetes version automatically