This message was deleted.
# k3s
a
This message was deleted.
c
… are you using k3s?
o
I am not, which is why I thought it was weird the flannel contact listed this channel πŸ™‚
c
the readme directs folks here because k3s is one of the few distros that includes flannel by default and folks were going to flannel asking for support
I would probably try the other recommended channel, flannel-users on calico users slack
o
ok, thanks
c
unless @bland-account-99790 has a better suggestion ;)
b
@orange-diamond-80084 is right. We changed the README in flannel because all the current flannel maintainers are working in K3s, so I thought it would be a good idea. TBH, I never check the calico users slack. Perhaps it would be good to add another channel here called flannel
@orange-diamond-80084 how are you starting flanneld.exe?
I think it is missing the kubeconfig file and that's why you get such log
These are the commands I normally use in pwershell:
Copy code
curl -L <https://github.com/flannel-io/flannel/releases/download/v0.24.0/flanneld.exe> -O
./flanneld.exe --kubeconfig-file=C:\Users\Administrator\flannel.kubeconfig --ip-masq --kube-subnet-mgr --iptables-forward-rules=false --net-config-path=C:\Users\Administrator\net-conf.json --iface 10.85.8.139
Oh, and you need the env variable
NODE_NAME
to be correct with the node hostname
thanks @creamy-pencil-82913 for pinging me
o
@bland-account-99790 I'm trying to run flannel as a hostprocess via a flannel daemon set. Long story short I've been using k8s with the docker shim, and I'm finally converting over to containerd. It's been a while since I changed my docker node automation, but I don't remember having to specify the kube config to the flannel pods themselves. I'll double check the old daemon set to confirm that though. Either way, before the dockershim deprecation, there was a nice "here's how to get up and running with Windows containers from A to Z" tutorial in the k8s documentation that was fairly straight forward tutorial, and now not so much. The closest I've found to this, is the guide in the sig windows tools project here: https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/guides/guide-for-adding-windows-node.md Which points to flannel images that do not seem to exist in docker.io. Are there plans for the windows flannel container images be pushed to docker.io again, or is there a different registry I should be looking to? 0.24.x didn't seem to be hosted on docker.io, and when searching for it just stumbled across a suggestion to build my own image, which seems hit or miss if I modify the start.ps1 script.
Just checked my old daemon set, and I don't see anything regarding the kubeconfig. I guess that's a changed requirement?
Sorry if I'm rambling, just trying to find the appropriate way to set it for the daemonset πŸ™‚
b
No worries, I became a flannel maintainer a few years ago and the project was half maintained, outdated dependencies, wrong docs, hundreds of unresponded issues, etc, it was a mess but I think we did a good job and its state is in general good. Unfortunately, the Windows part is something that somebody must have contributed and never came back, so it was not really documented. I had to made my way through it lately because we added support for it in our rke2 distro when using windows but I am not using hostprocesses, I am executing the flanneld command I wrote before, so can't really help you much but I am interested to see if we can make it run, and then we should definitely document it, otherwise the next person that tries will hit the same issue. Regarding the dockerhub images, we are releaseing them in docker.io, we had to change the org though because it was part of coreos and we did not have the credentials. This is the new org: https://hub.docker.com/r/flannelcni/flannel/tags
What are the images you were expecting to see there?
I don't remember ever seeing a Dockerfile specific for Windows
IIRC, the reason why it needs kubeconfig is because it needs to watch on the nodes. If you are running it as a daemonset and have it correctly running in Windows, you probably don't need that anymore
The docs you linked are running the image:
sigwindowstools/flannel:FLANNEL_VERSION-hostprocess
, it's the first time I read about that image, I guess the sigwindows is releasing it? Interesting, they have never informed us about it 🀷
o
Yep that's the one
b
and that image does not exist in Dockerhub?
o
Yeah, I can build that, and have pushed it to a local registry. However it seems if I ever modify the start.ps1 file, Windows tells me it doesn't find flanneld as a windows executable.
that's correct afaik
fwiw i tried modifying the start.ps1 file to copy over the kubelet.conf just to try to get it to work, and that's when i got hit with the executable problem.
b
have you tried asking in the sig-network sig-windows slack channel?
o
that I haven't, I asked sig-windows, but they said to ask you guys.
b
really? 😱 haha let me have a look, I'm in that channel too but I rarely check messages
just wrote there. It feels this guy is the one maintaining that https://github.com/Mik4sa but I can't find him in the sig-windows
o
Yeah I was going to ask him first, but had the same result.
I think I'll try to add a volume to the ds to C:/etc/kubernetes and see if that gets it to work
I'll let you know
I didn't want to experiment to far, I just assumed other folks have solved this issue πŸ˜„
b
It feels like this PR changed the behaviour https://github.com/flannel-io/flannel/pull/1132
and then maybe something changed in the goclient in a new version
o
does that mean the "redundant" code needs to be added back?
or just need to go about adding the kubeconfig differently?
So, mounting the host C:/etc/kubernetes doesn't seem to get the job done. I'm guessing flanneld by default isn't looking for kubelet.conf?
b
The person that created that PR thought the upstream kube-client code will take care of situations where kubeconfig is not available. But it seems it is not doing that anymore
why does flanneld need kubelet.conf?
o
I'm just assuming that's what it's needing since it's running as a hostprocess on the node itself
Also assuming that's just what it used previously. A lot of assumptions I know.
afaik when setting up a windows node, that's the only kube config that's created.
Just an update, I think I was able to get it to work
at least the flannel bits πŸ™‚
Well maybe...
Is this the expected logs from flannel?
b
Looks good but it is using a string
KUBEMANAGER_IP
instead of the IP, that's strange. Let me have a look at the code
Once you make it work, would you be so kind as to create a doc document in flannel with what was done? I could try and make it part of our CI
o
Oh i just replaced the IP with KUBEMANAGER_IP in the log i attached, sorry forgot to mention that πŸ™‚
Unfortunately to get it working, I ended up building a custom flannel hostprocess image that copied my kubelet.conf at runtime. I don't think this is the correct answer, but I may be wrong.
b
I am not familiar with hostprocess containers 🀷 . I hope the person that created those files can reply to the chat or to the issue that the other user created
o
Yep, no problem, just keeping you in the loop on how I was able to get it to function πŸ™‚
b
thanks!