kubernetes / minikube

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

Exiting due to GUEST_START: Failed kubeconfig update: writing kubeconfig: Error writing file C:\Users\John\.kube\config: open C:\Users\John\.kube\config: Access is denied. #13319

Closed JohnGossett closed 2 years ago

JohnGossett commented 2 years ago

What Happened?

While trying to set up a minikube cluster following this tutorial I received the titular error (Exiting due to GUEST_START: Failed kubeconfig update: writing kubeconfig: Error writing file C:\Users\John.kube\config: open C:\Users\John.kube\config: Access is denied.). There was no proposed solution above so I tried setting my environment variable KUBECONFIG to my .kube conf file (etc/kube/config) which seemed to help with a similar issue but it did not effect my problem. I am running: minikube v1.24.0 docker:

Client: Cloud integration: v1.0.22 Version: 20.10.11 API version: 1.41 Go version: go1.16.10 Git commit: dea9396 Built: Thu Nov 18 00:42:51 2021 OS/Arch: windows/amd64 Context: default Experimental: true

Server: Docker Engine - Community Engine: Version: 20.10.11 API version: 1.41 (minimum version 1.12) Go version: go1.16.9 Git commit: 847da18 Built: Thu Nov 18 00:35:39 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.12 GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d runc: Version: 1.0.2 GitCommit: v1.0.2-0-g52b36a2 docker-init: Version: 0.19.0 GitCommit: de40ad0

Attach the log file

I0109 18:02:50.615318 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube I0109 18:02:50.873494 23808 main.go:130] libmachine: Using SSH client type: native I0109 18:02:50.873494 23808 main.go:130] libmachine: &{{{ 0 [] [] []} docker [0x539f80] 0x53ce40 [] 0s} 127.0.0.1 60818 } I0109 18:02:50.873494 23808 main.go:130] libmachine: About to run SSH command:

    if ! grep -xq '.*\sminikube' /etc/hosts; then
        if grep -xq '127.0.1.1\s.*' /etc/hosts; then
            sudo sed -i 's/^127.0.1.1\s.*/127.0.1.1 minikube/g' /etc/hosts;
        else 
            echo '127.0.1.1 minikube' | sudo tee -a /etc/hosts; 
        fi
    fi

I0109 18:02:50.928703 23808 main.go:130] libmachine: SSH cmd err, output: : I0109 18:02:50.928703 23808 ubuntu.go:175] set auth options {CertDir:C:\Users\John.minikube CaCertPath:C:\Users\John.minikube\certs\ca.pem CaPrivateKeyPath:C:\Users\John.minikube\certs\ca-key.pem CaCertRemotePath:/etc/docker/ca.pem ServerCertPath:C:\Users\John.minikube\machines\server.pem ServerKeyPath:C:\Users\John.minikube\machines\server-key.pem ClientKeyPath:C:\Users\John.minikube\certs\key.pem ServerCertRemotePath:/etc/docker/server.pem ServerKeyRemotePath:/etc/docker/server-key.pem ClientCertPath:C:\Users\John.minikube\certs\cert.pem ServerCertSANs:[] StorePath:C:\Users\John.minikube} I0109 18:02:50.928703 23808 ubuntu.go:177] setting up certificates I0109 18:02:50.928703 23808 provision.go:83] configureAuth start I0109 18:02:50.934388 23808 cli_runner.go:115] Run: docker container inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}" minikube I0109 18:02:51.214845 23808 provision.go:138] copyHostCerts I0109 18:02:51.214845 23808 exec_runner.go:144] found C:\Users\John.minikube/key.pem, removing ... I0109 18:02:51.214845 23808 exec_runner.go:207] rm: C:\Users\John.minikube\key.pem I0109 18:02:51.215317 23808 exec_runner.go:151] cp: C:\Users\John.minikube\certs\key.pem --> C:\Users\John.minikube/key.pem (1675 bytes) I0109 18:02:51.215864 23808 exec_runner.go:144] found C:\Users\John.minikube/ca.pem, removing ... I0109 18:02:51.216367 23808 exec_runner.go:207] rm: C:\Users\John.minikube\ca.pem I0109 18:02:51.216389 23808 exec_runner.go:151] cp: C:\Users\John.minikube\certs\ca.pem --> C:\Users\John.minikube/ca.pem (1070 bytes) I0109 18:02:51.216913 23808 exec_runner.go:144] found C:\Users\John.minikube/cert.pem, removing ... I0109 18:02:51.216913 23808 exec_runner.go:207] rm: C:\Users\John.minikube\cert.pem I0109 18:02:51.216913 23808 exec_runner.go:151] cp: C:\Users\John.minikube\certs\cert.pem --> C:\Users\John.minikube/cert.pem (1115 bytes) I0109 18:02:51.217455 23808 provision.go:112] generating server cert: C:\Users\John.minikube\machines\server.pem ca-key=C:\Users\John.minikube\certs\ca.pem private-key=C:\Users\John.minikube\certs\ca-key.pem org=John.minikube san=[192.168.49.2 127.0.0.1 localhost 127.0.0.1 minikube minikube] I0109 18:02:51.287452 23808 provision.go:172] copyRemoteCerts I0109 18:02:51.297503 23808 ssh_runner.go:152] Run: sudo mkdir -p /etc/docker /etc/docker /etc/docker I0109 18:02:51.297503 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube I0109 18:02:51.572054 23808 sshutil.go:53] new ssh client: &{IP:127.0.0.1 Port:60818 SSHKeyPath:C:\Users\John.minikube\machines\minikube\id_rsa Username:docker} I0109 18:02:51.650818 23808 ssh_runner.go:319] scp C:\Users\John.minikube\certs\ca.pem --> /etc/docker/ca.pem (1070 bytes) I0109 18:02:51.662252 23808 ssh_runner.go:319] scp C:\Users\John.minikube\machines\server.pem --> /etc/docker/server.pem (1196 bytes) I0109 18:02:51.673194 23808 ssh_runner.go:319] scp C:\Users\John.minikube\machines\server-key.pem --> /etc/docker/server-key.pem (1675 bytes) I0109 18:02:51.684145 23808 provision.go:86] duration metric: configureAuth took 755.4421ms I0109 18:02:51.684145 23808 ubuntu.go:193] setting minikube options for container-runtime I0109 18:02:51.684677 23808 config.go:176] Loaded profile config "minikube": Driver=docker, ContainerRuntime=docker, KubernetesVersion=v1.22.3 I0109 18:02:51.689320 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube I0109 18:02:51.970461 23808 main.go:130] libmachine: Using SSH client type: native I0109 18:02:51.970976 23808 main.go:130] libmachine: &{{{ 0 [] [] []} docker [0x539f80] 0x53ce40 [] 0s} 127.0.0.1 60818 } I0109 18:02:51.970976 23808 main.go:130] libmachine: About to run SSH command: df --output=fstype / | tail -n 1 I0109 18:02:52.027543 23808 main.go:130] libmachine: SSH cmd err, output: : overlay

I0109 18:02:52.027543 23808 ubuntu.go:71] root file system type: overlay I0109 18:02:52.027543 23808 provision.go:309] Updating docker unit: /lib/systemd/system/docker.service ... I0109 18:02:52.032250 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube I0109 18:02:52.320467 23808 main.go:130] libmachine: Using SSH client type: native I0109 18:02:52.320467 23808 main.go:130] libmachine: &{{{ 0 [] [] []} docker [0x539f80] 0x53ce40 [] 0s} 127.0.0.1 60818 } I0109 18:02:52.320467 23808 main.go:130] libmachine: About to run SSH command: sudo mkdir -p /lib/systemd/system && printf %!s(MISSING) "[Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com BindsTo=containerd.service After=network-online.target firewalld.service containerd.service Wants=network-online.target Requires=docker.socket StartLimitBurst=3 StartLimitIntervalSec=60

[Service] Type=notify Restart=on-failure

This file is a systemd drop-in unit that inherits from the base dockerd configuration.

The base configuration already specifies an 'ExecStart=...' command. The first directive

here is to clear out that command inherited from the base configuration. Without this,

the command from the base configuration and the command specified here are treated as

a sequence of commands, which is not the desired behavior, nor is it valid -- systemd

will catch this invalid input and refuse to start the service with an error like:

Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services.

NOTE: default-ulimit=nofile is set to an arbitrary number for consistency with other

container runtimes. If left unlimited, it may result in OOM issues with MySQL.

ExecStart= ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --default-ulimit=nofile=1048576:1048576 --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=docker --insecure-registry 10.96.0.0/12 ExecReload=/bin/kill -s HUP \$MAINPID

Having non-zero Limit*s causes performance problems due to accounting overhead

in the kernel. We recommend using cgroups to do container-local accounting.

LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity

Uncomment TasksMax if your systemd version supports it.

Only systemd 226 and above support this version.

TasksMax=infinity TimeoutStartSec=0

set delegate yes so that systemd does not reset the cgroups of docker containers

Delegate=yes

kill only the docker process, not all processes in the cgroup

KillMode=process

[Install] WantedBy=multi-user.target " | sudo tee /lib/systemd/system/docker.service.new I0109 18:02:52.381814 23808 main.go:130] libmachine: SSH cmd err, output: : [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com BindsTo=containerd.service After=network-online.target firewalld.service containerd.service Wants=network-online.target Requires=docker.socket StartLimitBurst=3 StartLimitIntervalSec=60

[Service] Type=notify Restart=on-failure

This file is a systemd drop-in unit that inherits from the base dockerd configuration.

The base configuration already specifies an 'ExecStart=...' command. The first directive

here is to clear out that command inherited from the base configuration. Without this,

the command from the base configuration and the command specified here are treated as

a sequence of commands, which is not the desired behavior, nor is it valid -- systemd

will catch this invalid input and refuse to start the service with an error like:

Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services.

NOTE: default-ulimit=nofile is set to an arbitrary number for consistency with other

container runtimes. If left unlimited, it may result in OOM issues with MySQL.

ExecStart= ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --default-ulimit=nofile=1048576:1048576 --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=docker --insecure-registry 10.96.0.0/12 ExecReload=/bin/kill -s HUP $MAINPID

Having non-zero Limit*s causes performance problems due to accounting overhead

in the kernel. We recommend using cgroups to do container-local accounting.

LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity

Uncomment TasksMax if your systemd version supports it.

Only systemd 226 and above support this version.

TasksMax=infinity TimeoutStartSec=0

set delegate yes so that systemd does not reset the cgroups of docker containers

Delegate=yes

kill only the docker process, not all processes in the cgroup

KillMode=process

[Install] WantedBy=multi-user.target

I0109 18:02:52.386477 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube I0109 18:02:52.668075 23808 main.go:130] libmachine: Using SSH client type: native I0109 18:02:52.668401 23808 main.go:130] libmachine: &{{{ 0 [] [] []} docker [0x539f80] 0x53ce40 [] 0s} 127.0.0.1 60818 } I0109 18:02:52.668401 23808 main.go:130] libmachine: About to run SSH command: sudo diff -u /lib/systemd/system/docker.service /lib/systemd/system/docker.service.new || { sudo mv /lib/systemd/system/docker.service.new /lib/systemd/system/docker.service; sudo systemctl -f daemon-reload && sudo systemctl -f enable docker && sudo systemctl -f restart docker; } I0109 18:02:52.727214 23808 main.go:130] libmachine: SSH cmd err, output: : I0109 18:02:52.727227 23808 machine.go:91] provisioned docker machine in 2.4386845s I0109 18:02:52.727233 23808 start.go:267] post-start starting for "minikube" (driver="docker") I0109 18:02:52.727233 23808 start.go:277] creating required directories: [/etc/kubernetes/addons /etc/kubernetes/manifests /var/tmp/minikube /var/lib/minikube /var/lib/minikube/certs /var/lib/minikube/images /var/lib/minikube/binaries /tmp/gvisor /usr/share/ca-certificates /etc/ssl/certs] I0109 18:02:52.732980 23808 ssh_runner.go:152] Run: sudo mkdir -p /etc/kubernetes/addons /etc/kubernetes/manifests /var/tmp/minikube /var/lib/minikube /var/lib/minikube/certs /var/lib/minikube/images /var/lib/minikube/binaries /tmp/gvisor /usr/share/ca-certificates /etc/ssl/certs I0109 18:02:52.736652 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube I0109 18:02:53.039928 23808 sshutil.go:53] new ssh client: &{IP:127.0.0.1 Port:60818 SSHKeyPath:C:\Users\John.minikube\machines\minikube\id_rsa Username:docker} I0109 18:02:53.136168 23808 ssh_runner.go:152] Run: cat /etc/os-release I0109 18:02:53.138802 23808 main.go:130] libmachine: Couldn't set key PRIVACY_POLICY_URL, no corresponding struct field found I0109 18:02:53.138802 23808 main.go:130] libmachine: Couldn't set key VERSION_CODENAME, no corresponding struct field found I0109 18:02:53.138802 23808 main.go:130] libmachine: Couldn't set key UBUNTU_CODENAME, no corresponding struct field found I0109 18:02:53.138802 23808 info.go:137] Remote host: Ubuntu 20.04.2 LTS I0109 18:02:53.138802 23808 filesync.go:126] Scanning C:\Users\John.minikube\addons for local assets ... I0109 18:02:53.138802 23808 filesync.go:126] Scanning C:\Users\John.minikube\files for local assets ... I0109 18:02:53.138802 23808 start.go:270] post-start completed in 411.5693ms I0109 18:02:53.144515 23808 ssh_runner.go:152] Run: sh -c "df -h /var | awk 'NR==2{print $5}'" I0109 18:02:53.148657 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube I0109 18:02:53.445608 23808 sshutil.go:53] new ssh client: &{IP:127.0.0.1 Port:60818 SSHKeyPath:C:\Users\John.minikube\machines\minikube\id_rsa Username:docker} I0109 18:02:53.474994 23808 fix.go:57] fixHost completed within 3.4362934s I0109 18:02:53.474994 23808 start.go:80] releasing machines lock for "minikube", held for 3.4362934s I0109 18:02:53.479701 23808 cli_runner.go:115] Run: docker container inspect -f "{{range .NetworkSettings.Networks}}{{.IPAddress}},{{.GlobalIPv6Address}}{{end}}" minikube I0109 18:02:53.745774 23808 ssh_runner.go:152] Run: curl -sS -m 2 https://k8s.gcr.io/ I0109 18:02:53.750388 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube I0109 18:02:53.751424 23808 ssh_runner.go:152] Run: systemctl --version I0109 18:02:53.755545 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube I0109 18:02:54.031882 23808 sshutil.go:53] new ssh client: &{IP:127.0.0.1 Port:60818 SSHKeyPath:C:\Users\John.minikube\machines\minikube\id_rsa Username:docker} I0109 18:02:54.041288 23808 sshutil.go:53] new ssh client: &{IP:127.0.0.1 Port:60818 SSHKeyPath:C:\Users\John.minikube\machines\minikube\id_rsa Username:docker} I0109 18:02:54.343572 23808 ssh_runner.go:152] Run: sudo systemctl is-active --quiet service containerd I0109 18:02:54.356604 23808 ssh_runner.go:152] Run: sudo systemctl cat docker.service I0109 18:02:54.364444 23808 cruntime.go:255] skipping containerd shutdown because we are bound to it I0109 18:02:54.370722 23808 ssh_runner.go:152] Run: sudo systemctl is-active --quiet service crio I0109 18:02:54.378080 23808 ssh_runner.go:152] Run: /bin/bash -c "sudo mkdir -p /etc && printf %!s(MISSING) "runtime-endpoint: unix:///var/run/dockershim.sock image-endpoint: unix:///var/run/dockershim.sock " | sudo tee /etc/crictl.yaml" I0109 18:02:54.392724 23808 ssh_runner.go:152] Run: sudo systemctl unmask docker.service I0109 18:02:54.478605 23808 ssh_runner.go:152] Run: sudo systemctl enable docker.socket I0109 18:02:54.576204 23808 ssh_runner.go:152] Run: sudo systemctl cat docker.service I0109 18:02:54.588977 23808 ssh_runner.go:152] Run: sudo systemctl daemon-reload I0109 18:02:54.676937 23808 ssh_runner.go:152] Run: sudo systemctl start docker I0109 18:02:54.687886 23808 ssh_runner.go:152] Run: docker version --format {{.Server.Version}} I0109 18:02:54.725263 23808 ssh_runner.go:152] Run: docker version --format {{.Server.Version}} I0109 18:02:54.749378 23808 out.go:203] * Preparing Kubernetes v1.22.3 on Docker 20.10.8 ... I0109 18:02:54.754040 23808 cli_runner.go:115] Run: docker exec -t minikube dig +short host.docker.internal I0109 18:02:55.115311 23808 network.go:96] got host ip for mount in container by digging dns: 192.168.65.2 I0109 18:02:55.121031 23808 ssh_runner.go:152] Run: grep 192.168.65.2 host.minikube.internal$ /etc/hosts I0109 18:02:55.127803 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "8443/tcp") 0).HostPort}}'" minikube I0109 18:02:55.364608 23808 preload.go:132] Checking if preload exists for k8s version v1.22.3 and runtime docker I0109 18:02:55.368763 23808 ssh_runner.go:152] Run: docker images --format {{.Repository}}:{{.Tag}} I0109 18:02:55.389182 23808 docker.go:558] Got preloaded images: -- stdout -- k8s.gcr.io/kube-apiserver:v1.22.3 k8s.gcr.io/kube-controller-manager:v1.22.3 k8s.gcr.io/kube-scheduler:v1.22.3 k8s.gcr.io/kube-proxy:v1.22.3 kubernetesui/dashboard:v2.3.1 k8s.gcr.io/etcd:3.5.0-0 kubernetesui/metrics-scraper:v1.0.7 k8s.gcr.io/coredns/coredns:v1.8.4 gcr.io/k8s-minikube/storage-provisioner:v5 k8s.gcr.io/pause:3.5

-- /stdout -- I0109 18:02:55.389182 23808 docker.go:489] Images already preloaded, skipping extraction I0109 18:02:55.393346 23808 ssh_runner.go:152] Run: docker images --format {{.Repository}}:{{.Tag}} I0109 18:02:55.413599 23808 docker.go:558] Got preloaded images: -- stdout -- k8s.gcr.io/kube-apiserver:v1.22.3 k8s.gcr.io/kube-scheduler:v1.22.3 k8s.gcr.io/kube-controller-manager:v1.22.3 k8s.gcr.io/kube-proxy:v1.22.3 kubernetesui/dashboard:v2.3.1 k8s.gcr.io/etcd:3.5.0-0 kubernetesui/metrics-scraper:v1.0.7 k8s.gcr.io/coredns/coredns:v1.8.4 gcr.io/k8s-minikube/storage-provisioner:v5 k8s.gcr.io/pause:3.5

-- /stdout -- I0109 18:02:55.413599 23808 cache_images.go:79] Images are preloaded, skipping loading I0109 18:02:55.418296 23808 ssh_runner.go:152] Run: docker info --format {{.CgroupDriver}} I0109 18:02:55.467221 23808 cni.go:93] Creating CNI manager for "" I0109 18:02:55.467221 23808 cni.go:167] CNI unnecessary in this configuration, recommending no CNI I0109 18:02:55.467221 23808 kubeadm.go:87] Using pod CIDR: 10.244.0.0/16 I0109 18:02:55.467221 23808 kubeadm.go:153] kubeadm options: {CertDir:/var/lib/minikube/certs ServiceCIDR:10.96.0.0/12 PodSubnet:10.244.0.0/16 AdvertiseAddress:192.168.49.2 APIServerPort:8443 KubernetesVersion:v1.22.3 EtcdDataDir:/var/lib/minikube/etcd EtcdExtraArgs:map[] ClusterName:minikube NodeName:minikube DNSDomain:cluster.local CRISocket:/var/run/dockershim.sock ImageRepository: ComponentOptions:[{Component:apiServer ExtraArgs:map[enable-admission-plugins:NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota] Pairs:map[certSANs:["127.0.0.1", "localhost", "192.168.49.2"]]} {Component:controllerManager ExtraArgs:map[allocate-node-cidrs:true leader-elect:false] Pairs:map[]} {Component:scheduler ExtraArgs:map[leader-elect:false] Pairs:map[]}] FeatureArgs:map[] NoTaintMaster:true NodeIP:192.168.49.2 CgroupDriver:cgroupfs ClientCAFile:/var/lib/minikube/certs/ca.crt StaticPodPath:/etc/kubernetes/manifests ControlPlaneAddress:control-plane.minikube.internal KubeProxyOptions:map[]} I0109 18:02:55.467741 23808 kubeadm.go:157] kubeadm config: apiVersion: kubeadm.k8s.io/v1beta2 kind: InitConfiguration localAPIEndpoint: advertiseAddress: 192.168.49.2 bindPort: 8443 bootstrapTokens:

I0109 18:02:55.467741 23808 kubeadm.go:909] kubelet [Unit] Wants=docker.socket

[Service] ExecStart= ExecStart=/var/lib/minikube/binaries/v1.22.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime=docker --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.49.2

[Install] config: {KubernetesVersion:v1.22.3 ClusterName:minikube Namespace:default APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: CustomIngressCert: ExtraOptions:[] ShouldLoadCachedImages:true EnableDefaultCNI:false CNI: NodeIP: NodePort:8443 NodeName:} I0109 18:02:55.473578 23808 ssh_runner.go:152] Run: sudo ls /var/lib/minikube/binaries/v1.22.3 I0109 18:02:55.478258 23808 binaries.go:44] Found k8s binaries, skipping transfer I0109 18:02:55.484472 23808 ssh_runner.go:152] Run: sudo mkdir -p /etc/systemd/system/kubelet.service.d /lib/systemd/system /var/tmp/minikube I0109 18:02:55.488664 23808 ssh_runner.go:319] scp memory --> /etc/systemd/system/kubelet.service.d/10-kubeadm.conf (334 bytes) I0109 18:02:55.496988 23808 ssh_runner.go:319] scp memory --> /lib/systemd/system/kubelet.service (352 bytes) I0109 18:02:55.505354 23808 ssh_runner.go:319] scp memory --> /var/tmp/minikube/kubeadm.yaml.new (2051 bytes) I0109 18:02:55.519435 23808 ssh_runner.go:152] Run: grep 192.168.49.2 control-plane.minikube.internal$ /etc/hosts I0109 18:02:55.521521 23808 certs.go:54] Setting up C:\Users\John.minikube\profiles\minikube for IP: 192.168.49.2 I0109 18:02:55.522044 23808 certs.go:182] skipping minikubeCA CA generation: C:\Users\John.minikube\ca.key I0109 18:02:55.522044 23808 certs.go:182] skipping proxyClientCA CA generation: C:\Users\John.minikube\proxy-client-ca.key I0109 18:02:55.522044 23808 certs.go:298] skipping minikube-user signed cert generation: C:\Users\John.minikube\profiles\minikube\client.key I0109 18:02:55.522559 23808 certs.go:298] skipping minikube signed cert generation: C:\Users\John.minikube\profiles\minikube\apiserver.key.dd3b5fb2 I0109 18:02:55.522559 23808 certs.go:298] skipping aggregator signed cert generation: C:\Users\John.minikube\profiles\minikube\proxy-client.key I0109 18:02:55.523081 23808 certs.go:388] found cert: C:\Users\John.minikube\certs\C:\Users\John.minikube\certs\ca-key.pem (1675 bytes) I0109 18:02:55.523081 23808 certs.go:388] found cert: C:\Users\John.minikube\certs\C:\Users\John.minikube\certs\ca.pem (1070 bytes) I0109 18:02:55.523081 23808 certs.go:388] found cert: C:\Users\John.minikube\certs\C:\Users\John.minikube\certs\cert.pem (1115 bytes) I0109 18:02:55.523081 23808 certs.go:388] found cert: C:\Users\John.minikube\certs\C:\Users\John.minikube\certs\key.pem (1675 bytes) I0109 18:02:55.524117 23808 ssh_runner.go:319] scp C:\Users\John.minikube\profiles\minikube\apiserver.crt --> /var/lib/minikube/certs/apiserver.crt (1399 bytes) I0109 18:02:55.535710 23808 ssh_runner.go:319] scp C:\Users\John.minikube\profiles\minikube\apiserver.key --> /var/lib/minikube/certs/apiserver.key (1675 bytes) I0109 18:02:55.546645 23808 ssh_runner.go:319] scp C:\Users\John.minikube\profiles\minikube\proxy-client.crt --> /var/lib/minikube/certs/proxy-client.crt (1147 bytes) I0109 18:02:55.557605 23808 ssh_runner.go:319] scp C:\Users\John.minikube\profiles\minikube\proxy-client.key --> /var/lib/minikube/certs/proxy-client.key (1675 bytes) I0109 18:02:55.567976 23808 ssh_runner.go:319] scp C:\Users\John.minikube\ca.crt --> /var/lib/minikube/certs/ca.crt (1111 bytes) I0109 18:02:55.578904 23808 ssh_runner.go:319] scp C:\Users\John.minikube\ca.key --> /var/lib/minikube/certs/ca.key (1675 bytes) I0109 18:02:55.589847 23808 ssh_runner.go:319] scp C:\Users\John.minikube\proxy-client-ca.crt --> /var/lib/minikube/certs/proxy-client-ca.crt (1119 bytes) I0109 18:02:55.600927 23808 ssh_runner.go:319] scp C:\Users\John.minikube\proxy-client-ca.key --> /var/lib/minikube/certs/proxy-client-ca.key (1679 bytes) I0109 18:02:55.612387 23808 ssh_runner.go:319] scp C:\Users\John.minikube\ca.crt --> /usr/share/ca-certificates/minikubeCA.pem (1111 bytes) I0109 18:02:55.623460 23808 ssh_runner.go:319] scp memory --> /var/lib/minikube/kubeconfig (738 bytes) I0109 18:02:55.637529 23808 ssh_runner.go:152] Run: openssl version I0109 18:02:55.646883 23808 ssh_runner.go:152] Run: sudo /bin/bash -c "test -s /usr/share/ca-certificates/minikubeCA.pem && ln -fs /usr/share/ca-certificates/minikubeCA.pem /etc/ssl/certs/minikubeCA.pem" I0109 18:02:55.657808 23808 ssh_runner.go:152] Run: ls -la /usr/share/ca-certificates/minikubeCA.pem I0109 18:02:55.660421 23808 certs.go:431] hashing: -rw-r--r-- 1 root root 1111 Jan 9 22:39 /usr/share/ca-certificates/minikubeCA.pem I0109 18:02:55.666121 23808 ssh_runner.go:152] Run: openssl x509 -hash -noout -in /usr/share/ca-certificates/minikubeCA.pem I0109 18:02:55.675450 23808 ssh_runner.go:152] Run: sudo /bin/bash -c "test -L /etc/ssl/certs/b5213941.0 || ln -fs /etc/ssl/certs/minikubeCA.pem /etc/ssl/certs/b5213941.0" I0109 18:02:55.680147 23808 kubeadm.go:390] StartCluster: {Name:minikube KeepContext:false EmbedCerts:false MinikubeISO: KicBaseImage:gcr.io/k8s-minikube/kicbase:v0.0.28@sha256:4780f1897569d2bf77aafb3d133a08d42b4fe61127f06fcfc90c2c5d902d893c Memory:2500 CPUs:3 DiskSize:20000 VMDriver: Driver:docker HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] ContainerVolumeMounts:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.59.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false KVMNUMACount:1 DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio SSHIPAddress: SSHUser:root SSHKey: SSHPort:22 KubernetesConfig:{KubernetesVersion:v1.22.3 ClusterName:minikube Namespace:default APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: CustomIngressCert: ExtraOptions:[] ShouldLoadCachedImages:true EnableDefaultCNI:false CNI: NodeIP: NodePort:8443 NodeName:} Nodes:[{Name: IP:192.168.49.2 Port:8443 KubernetesVersion:v1.22.3 ControlPlane:true Worker:true}] Addons:map[] CustomAddonImages:map[] CustomAddonRegistries:map[] VerifyComponents:map[apiserver:true system_pods:true] StartHostTimeout:6m0s ScheduledStop: ExposedPorts:[] ListenAddress: Network: MultiNodeRequested:false ExtraDisks:0 CertExpiration:26280h0m0s Mount:false MountString:C:\Users\John:/minikube-host} I0109 18:02:55.684797 23808 sshrunner.go:152] Run: docker ps --filter status=paused --filter=name=k8s.*(kube-system) --format={{.ID}} I0109 18:02:55.709465 23808 ssh_runner.go:152] Run: sudo ls /var/lib/kubelet/kubeadm-flags.env /var/lib/kubelet/config.yaml /var/lib/minikube/etcd I0109 18:02:55.714711 23808 kubeadm.go:401] found existing configuration files, will attempt cluster restart I0109 18:02:55.714711 23808 kubeadm.go:600] restartCluster start I0109 18:02:55.720954 23808 ssh_runner.go:152] Run: sudo test -d /data/minikube I0109 18:02:55.725550 23808 kubeadm.go:126] /data/minikube skipping compat symlinks: sudo test -d /data/minikube: Process exited with status 1 stdout:

stderr: I0109 18:02:55.729671 23808 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "8443/tcp") 0).HostPort}}'" minikube I0109 18:02:55.969227 23808 kubeconfig.go:116] verify returned: extract IP: "minikube" does not appear in C:\Users\John.kube\config I0109 18:02:55.969227 23808 kubeconfig.go:127] "minikube" context is missing from C:\Users\John.kube\config - will repair! I0109 18:02:55.969746 23808 lock.go:35] WriteFile acquiring C:\Users\John.kube\config: {Name:mk323df93072bb1fdcb54a5cfaf36a282ef18e91 Clock:{} Delay:500ms Timeout:1m0s Cancel:} W0109 18:02:55.970268 23808 kubeadm.go:636] unable to update kubeconfig (cluster will likely require a reset): write: Error writing file C:\Users\John.kube\config: open C:\Users\John.kube\config: Access is denied. I0109 18:02:55.970790 23808 kubeadm.go:604] restartCluster took 256.0793ms W0109 18:02:55.970790 23808 out.go:241] ! Unable to restart cluster, will reset it: getting k8s client: client config: client config: context "minikube" does not exist I0109 18:02:55.971310 23808 ssh_runner.go:152] Run: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm reset --cri-socket /var/run/dockershim.sock --force" I0109 18:03:28.193126 23808 ssh_runner.go:192] Completed: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$PATH" kubeadm reset --cri-socket /var/run/dockershim.sock --force": (32.2218162s) I0109 18:03:28.199545 23808 ssh_runner.go:152] Run: sudo systemctl stop -f kubelet I0109 18:03:28.211517 23808 sshrunner.go:152] Run: docker ps -a --filter=name=k8s.*(kube-system) --format={{.ID}} I0109 18:03:28.237256 23808 ssh_runner.go:152] Run: sudo cp /var/tmp/minikube/kubeadm.yaml.new /var/tmp/minikube/kubeadm.yaml I0109 18:03:28.242468 23808 kubeadm.go:220] ignoring SystemVerification for kubeadm because of docker driver I0109 18:03:28.248243 23808 ssh_runner.go:152] Run: sudo ls -la /etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf I0109 18:03:28.253477 23808 kubeadm.go:151] config check failed, skipping stale config cleanup: sudo ls -la /etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf: Process exited with status 2 stdout:

stderr: ls: cannot access '/etc/kubernetes/admin.conf': No such file or directory ls: cannot access '/etc/kubernetes/kubelet.conf': No such file or directory ls: cannot access '/etc/kubernetes/controller-manager.conf': No such file or directory ls: cannot access '/etc/kubernetes/scheduler.conf': No such file or directory I0109 18:03:28.253477 23808 ssh_runner.go:243] Start: /bin/bash -c "sudo env PATH="/var/lib/minikube/binaries/v1.22.3:$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" I0109 18:03:36.028484 23808 out.go:203] - Generating certificates and keys ... I0109 18:03:36.031130 23808 out.go:203] - Booting up control plane ... I0109 18:03:36.034123 23808 out.go:203] - Configuring RBAC rules ... I0109 18:03:36.035691 23808 cni.go:93] Creating CNI manager for "" I0109 18:03:36.035691 23808 cni.go:167] CNI unnecessary in this configuration, recommending no CNI I0109 18:03:36.035691 23808 ssh_runner.go:152] Run: /bin/bash -c "cat /proc/$(pgrep kube-apiserver)/oom_adj" I0109 18:03:36.044187 23808 ssh_runner.go:152] Run: sudo /var/lib/minikube/binaries/v1.22.3/kubectl create clusterrolebinding minikube-rbac --clusterrole=cluster-admin --serviceaccount=kube-system:default --kubeconfig=/var/lib/minikube/kubeconfig I0109 18:03:36.044187 23808 ssh_runner.go:152] Run: sudo /var/lib/minikube/binaries/v1.22.3/kubectl label nodes minikube.k8s.io/version=v1.24.0 minikube.k8s.io/commit=76b94fb3c4e8ac5062daf70d60cf03ddcc0a741b minikube.k8s.io/name=minikube minikube.k8s.io/updated_at=2022_01_09T18_03_36_0700 --all --overwrite --kubeconfig=/var/lib/minikube/kubeconfig I0109 18:03:36.048773 23808 ops.go:34] apiserver oom_adj: -16 I0109 18:03:36.135344 23808 kubeadm.go:985] duration metric: took 99.6523ms to wait for elevateKubeSystemPrivileges. I0109 18:03:36.135344 23808 kubeadm.go:392] StartCluster complete in 40.4551966s I0109 18:03:36.135344 23808 settings.go:142] acquiring lock: {Name:mkdba036b97918f39b5e40b845a11780e1043b53 Clock:{} Delay:500ms Timeout:1m0s Cancel:} I0109 18:03:36.135344 23808 settings.go:150] Updating kubeconfig: C:\Users\John.kube\config I0109 18:03:36.136921 23808 lock.go:35] WriteFile acquiring C:\Users\John.kube\config: {Name:mk323df93072bb1fdcb54a5cfaf36a282ef18e91 Clock:{} Delay:500ms Timeout:1m0s Cancel:} I0109 18:03:36.138492 23808 out.go:176] W0109 18:03:36.139019 23808 out.go:241] X Exiting due to GUEST_START: Failed kubeconfig update: writing kubeconfig: Error writing file C:\Users\John.kube\config: open C:\Users\John.kube\config: Access is denied. W0109 18:03:36.139559 23808 out.go:241] W0109 18:03:36.140086 23808 out.go:241] ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ 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. │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯

Operating System

Windows

Driver

Docker

spowelljr commented 2 years ago

Hi @JohnGossett, thanks for reporting your issue with minikube!

Just curious if you're able to open that file yourself in Notepad or another app? It's possible that file has a weird permission on it. Let me know the result, thanks!

klaases commented 2 years ago

Hi @JohnGossett, were you able to try @spowelljr's suggestion above?

JohnGossett commented 2 years ago

Nope! Totally missed the message, sorry. I'll try that tonight or tomorrow asap


From: klaases @.> Sent: Wednesday, February 9, 2022 1:15 PM To: kubernetes/minikube @.> Cc: Gossett, John @.>; Mention @.> Subject: Re: [kubernetes/minikube] Exiting due to GUEST_START: Failed kubeconfig update: writing kubeconfig: Error writing file C:\Users\John.kube\config: open C:\Users\John.kube\config: Access is denied. (Issue #13319)

Hi @JohnGossetthttps://urldefense.com/v3/__https://github.com/JohnGossett__;!!KGKeukY!h835tc6YCOE70fPb6z2isms9zw7QVuSLCLwFg2o_mkaRJ99XSsSrtT4sp-tE0n-DxIiRLcUfNSva$, were you able to try @spowelljrhttps://urldefense.com/v3/__https://github.com/spowelljr__;!!KGKeukY!h835tc6YCOE70fPb6z2isms9zw7QVuSLCLwFg2o_mkaRJ99XSsSrtT4sp-tE0n-DxIiRLedEKnVL$'s suggestion above?

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/kubernetes/minikube/issues/13319*issuecomment-1034106301__;Iw!!KGKeukY!h835tc6YCOE70fPb6z2isms9zw7QVuSLCLwFg2o_mkaRJ99XSsSrtT4sp-tE0n-DxIiRLYk08lwW$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ASQZRJVL4VH4AALDRIOMFIDU2K4NVANCNFSM5LSMRH3A__;!!KGKeukY!h835tc6YCOE70fPb6z2isms9zw7QVuSLCLwFg2o_mkaRJ99XSsSrtT4sp-tE0n-DxIiRLfExGjjx$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!KGKeukY!h835tc6YCOE70fPb6z2isms9zw7QVuSLCLwFg2o_mkaRJ99XSsSrtT4sp-tE0n-DxIiRLfLfPJWY$ or Androidhttps://urldefense.com/v3/__https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!KGKeukY!h835tc6YCOE70fPb6z2isms9zw7QVuSLCLwFg2o_mkaRJ99XSsSrtT4sp-tE0n-DxIiRLZFjYfor$. You are receiving this because you were mentioned.Message ID: @.***>

spowelljr commented 2 years ago

@JohnGossett any update?

JohnGossett commented 2 years ago

File permissions didn't seem to be the issue after successfully opening with notepad++ and also manually checking them. Ultimately I ended up completely reinstalling and the issue didn't reoccur, just forgot to update (sorry!)

sharifelgamal commented 2 years ago

Cool, I'll go ahead and close this issue then. Feel free to reopen if you ever run into it again.