kubernetes / minikube

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

minikube fails to launch #17736

Closed gdoaks1 closed 5 months ago

gdoaks1 commented 10 months ago

What Happened?

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

Loading personal and system profiles took 1719ms. PS C:\Users\GDoaks1> history PS C:\Users\GDoaks1> minikube start --nodes 2 -p multinode-demo

stderr: W1205 22:07:44.170132 10430 initconfiguration.go:119] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/var/run/cri-dockerd.sock". Please update your configuration! [WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service' error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.25.6: output: time="2023-12-05T22:07:44Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.25.6: output: time="2023-12-05T22:07:45Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-scheduler:v1.25.6: output: time="2023-12-05T22:07:46Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-proxy:v1.25.6: output: time="2023-12-05T22:07:46Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/pause:3.8: output: time="2023-12-05T22:07:47Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/coredns/coredns:v1.9.3: output: time="2023-12-05T22:07:48Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=... To see the stack trace of this error execute with --v=5 or higher

* X Error starting cluster: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.25.6:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1 stdout: [init] Using Kubernetes version: v1.25.6 [preflight] Running pre-flight checks [preflight] Pulling images required for setting up a Kubernetes cluster [preflight] This might take a minute or two, depending on the speed of your internet connection [preflight] You can also perform this action in beforehand using 'kubeadm config images pull'

stderr: W1205 22:07:50.387299 11829 initconfiguration.go:119] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/var/run/cri-dockerd.sock". Please update your configuration! [WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service' error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.25.6: output: time="2023-12-05T22:07:51Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.25.6: output: time="2023-12-05T22:07:51Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-scheduler:v1.25.6: output: time="2023-12-05T22:07:52Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-proxy:v1.25.6: output: time="2023-12-05T22:07:53Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/pause:3.8: output: time="2023-12-05T22:07:54Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/coredns/coredns:v1.9.3: output: time="2023-12-05T22:07:54Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=... To see the stack trace of this error execute with --v=5 or higher

╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ If the above advice does not help, please let us know: │ │ https://github.com/kubernetes/minikube/issues/new/choose │ │ │ │ * Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯

X Exiting due to GUEST_START: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.25.6:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1 stdout: [init] Using Kubernetes version: v1.25.6 [preflight] Running pre-flight checks [preflight] Pulling images required for setting up a Kubernetes cluster [preflight] This might take a minute or two, depending on the speed of your internet connection [preflight] You can also perform this action in beforehand using 'kubeadm config images pull'

stderr: W1205 22:07:50.387299 11829 initconfiguration.go:119] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/var/run/cri-dockerd.sock". Please update your configuration! [WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service' error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.25.6: output: time="2023-12-05T22:07:51Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.25.6: output: time="2023-12-05T22:07:51Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-scheduler:v1.25.6: output: time="2023-12-05T22:07:52Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-proxy:v1.25.6: output: time="2023-12-05T22:07:53Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/pause:3.8: output: time="2023-12-05T22:07:54Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/coredns/coredns:v1.9.3: output: time="2023-12-05T22:07:54Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = Error response from daemon: Get \"https://registry.k8s.io/v2/\": x509: certificate signed by unknown authority" , error: exit status 1 [preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=... To see the stack trace of this error execute with --v=5 or higher

╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ If the above advice does not help, please let us know: │ │ https://github.com/kubernetes/minikube/issues/new/choose │ │ │ │ * Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯

PS C:\Users\GDoaks1> ^I

Attach the log file

PS C:\Users\GDoaks1> minikube logs --file=logs.txt

Operating System

Windows

Driver

Docker

kundan2707 commented 10 months ago

@gdoaks1 check ssl certificate valid or not .

kundan2707 commented 10 months ago

/kind support

gdoaks1 commented 10 months ago

its a fresh install so cert should be new i executed minikube delete --purge --all prior to the start

pnasrat commented 10 months ago

@gdoaks1 Please note the documentation on this error here https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/#x509-certificate-signed-by-unknown-authority

The error Error response from daemon: Get "[https://registry.k8s.io/v2/\](https://registry.k8s.io/v2/%5C)": x509: certificate signed by unknown authority" is not related to minikube generated certificates but is most likely due to a corporate proxy on your end that - so you may need to add the PEM file from your corporate IT or extract it from chrome as in https://github.com/kubernetes/minikube/issues/3613#issuecomment-819402727

Can you do this and see if it resolves your issue

/triage needs-information

gdoaks1 commented 10 months ago

now im getting PS C:\Users\GDoaks1> minikube start --nodes 2 -p multinode-demo

Unfortunately, an error has occurred: timed out waiting for the condition

This error is likely caused by:

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:

Additionally, a control plane component may have crashed or exited when started by the container runtime. To troubleshoot, list all containers using your preferred container runtimes CLI. Here is one example how you may list all running Kubernetes containers by using crictl:

stderr: W1206 17:14:06.937450 1219 initconfiguration.go:119] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/var/run/cri-dockerd.sock". Please update your configuration! [WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service' error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster To see the stack trace of this error execute with --v=5 or higher

Unfortunately, an error has occurred: timed out waiting for the condition

This error is likely caused by:

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:

Additionally, a control plane component may have crashed or exited when started by the container runtime. To troubleshoot, list all containers using your preferred container runtimes CLI. Here is one example how you may list all running Kubernetes containers by using crictl:

stderr: W1206 17:18:12.397348 3601 initconfiguration.go:119] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/var/run/cri-dockerd.sock". Please update your configuration! [WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service' error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster To see the stack trace of this error execute with --v=5 or higher

╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ If the above advice does not help, please let us know: │ │ https://github.com/kubernetes/minikube/issues/new/choose │ │ │ │ * Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯

X Exiting due to K8S_KUBELET_NOT_RUNNING: wait: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.25.2:$PATH" kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,SystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1 stdout: [init] Using Kubernetes version: v1.25.2 [preflight] Running pre-flight checks [preflight] Pulling images required for setting up a Kubernetes cluster [preflight] This might take a minute or two, depending on the speed of your internet connection [preflight] You can also perform this action in beforehand using 'kubeadm config images pull' [certs] Using certificateDir folder "/var/lib/minikube/certs" [certs] Using existing ca certificate authority [certs] Using existing apiserver certificate and key on disk [certs] Using existing apiserver-kubelet-client certificate and key on disk [certs] Using existing front-proxy-ca certificate authority [certs] Using existing front-proxy-client certificate and key on disk [certs] Using existing etcd/ca certificate authority [certs] Using existing etcd/server certificate and key on disk [certs] Using existing etcd/peer certificate and key on disk [certs] Using existing etcd/healthcheck-client certificate and key on disk [certs] Using existing apiserver-etcd-client certificate and key on disk [certs] Using the existing "sa" key [kubeconfig] Using kubeconfig folder "/etc/kubernetes" [kubeconfig] Writing "admin.conf" kubeconfig file [kubeconfig] Writing "kubelet.conf" kubeconfig file [kubeconfig] Writing "controller-manager.conf" kubeconfig file [kubeconfig] Writing "scheduler.conf" kubeconfig file [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env" [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml" [kubelet-start] Starting the kubelet [control-plane] Using manifest folder "/etc/kubernetes/manifests" [control-plane] Creating static Pod manifest for "kube-apiserver" [control-plane] Creating static Pod manifest for "kube-controller-manager" [control-plane] Creating static Pod manifest for "kube-scheduler" [etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests" [wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s [kubelet-check] Initial timeout of 40s passed.

Unfortunately, an error has occurred: timed out waiting for the condition

This error is likely caused by:

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:

Additionally, a control plane component may have crashed or exited when started by the container runtime. To troubleshoot, list all containers using your preferred container runtimes CLI. Here is one example how you may list all running Kubernetes containers by using crictl:

stderr: W1206 17:18:12.397348 3601 initconfiguration.go:119] Usage of CRI endpoints without URL scheme is deprecated and can cause kubelet errors in the future. Automatically prepending scheme "unix" to the "criSocket" with value "/var/run/cri-dockerd.sock". Please update your configuration! [WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service' error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster To see the stack trace of this error execute with --v=5 or higher

PS C:\Users\GDoaks1>

pnasrat commented 10 months ago

@gdoaks1 as linked in the new error see https://minikube.sigs.k8s.io/docs/reference/networking/proxy/

If you have a corporate proxy please ensure you are running minikube with the appropriate environment variables set

set HTTP_PROXY=http://<proxy hostname:port>
set HTTPS_PROXY=https://<proxy hostname:port>
set NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.59.0/24,192.168.49.0/24,192.168.39.0/24

minikube start

Can you try stopping then starting with those environment variables correctly set (changing <proxy hostname:port> for your environment eg set HTTP_PROXY=http://proxy.example.com:3128

gdoaks1 commented 10 months ago

this is on company pc but im using home internet no vpn... there shouldnt be a proxy here

gdoaks1 commented 10 months ago

or what value should I assign

pnasrat commented 10 months ago

Unfortunately I do not have access to any windows systems to try help diagnose local network configuration but things that you can check to identify further where the issue might be - but this most likely is the setup of your corporate machine

  1. Can regular docker containers access the internet - eg docker run --rm curlimages/curl:8.5.0 -LI https://registry.k8s.io/ includes a HTTP 200 response.
  2. Check your proxy configuration in the Windows gui by Select the Start button, then select Settings > Network & internet > Proxy. See more use a proxy server in windows - note this may be configured in a number of ways.
  3. If you use chrome or Edge you can chrome://net-internals/#proxy or possibly edge://net-internals/#proxy to view what the browser thinks it is using as a proxy
gdoaks1 commented 10 months ago

PS C:\Users\GDoaks1> docker run --rm curlimages/curl:8.5.0 -LI https://registry.k8s.io/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above. PS C:\Users\GDoaks1>

gdoaks1 commented 10 months ago

but with -V option it works

PS C:\Users\GDoaks1> curl -V

cmdlet Invoke-WebRequest at command pipeline position 1 Supply values for the following parameters: Uri: https://registry.k8s.io/ VERBOSE: GET with 0-byte payload VERBOSE: received -1-byte response of content type text/html; charset=utf-8

StatusCode : 200 StatusDescription : OK Content :

gdoaks1 commented 10 months ago

Adding proxy readout

k8s-triage-robot commented 7 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 6 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 5 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 5 months ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes/minikube/issues/17736#issuecomment-2103265018): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.