kubernetes-sigs / sig-windows-tools

Repository for tools and artifacts related to the sig-windows charter in Kubernetes. Scripts to assist kubeadm and wincat and flannel will be hosted here.
Apache License 2.0
123 stars 123 forks source link

Unable to deploy flannel #357

Open oscgu opened 8 months ago

oscgu commented 8 months ago

Describe the bug Whenever I try to deploy flannel it keeps crash looping with the following error:

W0104 05:45:01.747597 3296 client_config.go:617] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work. W0104 05:45:01.748130 3296 client_config.go:622] error creating inClusterConfig, falling back to default config: open /var/run/secrets/kubernetes.io/serviceaccount/token: The system cannot find the path specified. E0104 05:45:01.749443 3296 main.go:226] Failed to create SubnetManager: fail to create kubernetes config: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

Setting the KUBERNETES_MASTER env variable does nothing.

To Reproduce Build the flannel image, adjust the place-holders in the deployment file and apply it.

Expected behavior No crash loop

Kubernetes (please complete the following information):

Additional info It's a mixed cluster (linux & windows) Same issue when using Containerd 1.7.11

k8s-triage-robot commented 5 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

oscgu commented 5 months ago

/remove-lifecycle stale

k8s-triage-robot commented 2 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

oscgu commented 2 months ago

/remove-lifecycle stale

k8s-ap commented 1 month ago

Any solution to this problem? I am having the same issue.

cyqsimon commented 1 month ago

Bump. Ran into the same issue today.

cyqsimon commented 1 month ago

After some searching around, this looks to be the actual issue. Posting for anyone who lands here.

https://github.com/kubernetes/kubernetes/issues/104562

cyqsimon commented 1 month ago

Found the problem. Turns out, the hard-coded /var/run/secrets/kubernetes.io/serviceaccount/ is not supported in contained 1.6. So just install contained 1.7+ and you should be good to go.

References:

Edit:

Seems like OP was using 1.7 so I don't know then. Updating to 1.7 fixed it for me.