-
Notifications
You must be signed in to change notification settings - Fork 294
Support hostPort
with CNI
#704
Comments
@c-knowles Thanks for the info! |
Sure, let's verify that I can try on our clusters. FYI I hit this from datadog's latest install notes which use the host port functionality. |
Ha! This just cost me a couple of hours :-) |
I'm having issues getting HostPort working with the proper This is along the lines of what I have:
I've searched over the web and there only seems to be instructions for Calico, but not flannel. |
@chen-anders What is the file extension? I have read it should be |
@klausenbusk - Update: I was able to get it working with the v0.6.0-rc2 release downloaded from here: https://github.com/containernetworking/plugins/releases |
I guess I'm still a little confused on how one would configure FYI – Running kube-aws version v0.9.9-rc.2 |
@drywheat Hi! If you have not tried yet - Perhaps you need to include the portmap plugin in the cni config? |
On the datadog side they are adding/migrating to unix socket support in their next agent which will remove this as an issue and allow for better pod introspection. But it’s still a problem I’d like to resolve for other cases. |
kubernetes 1.9 includes CNI 0.6.0, which should support hostPort with flannel, via the portmap plugin. |
@9len I think it was Calico+flannel that had the hostPort issue? And this was fixed in Kubernetes 1.7. Certainly hostPort works with |
I believe this was about flannel + cni, for which (as far as I was able to determine) hostPort doesn't work without cni 0.6.0 (which was added in kube 1.9) |
hostPort cannot work with kubernetes 1.9.2 and CNI 0.6.0 ? My enviroment: kubernetes-cni-0.6.0-0.x86_64 |
Calico is CNI provider. Certainly Fannel+Calico+CNI+hostPort works in k8s 1.8.x because that is what we run. Reportly this combo works in 1.7 also - thanks to the introduction of plugin-chaining in that version, but I haven't personally tested that. There used to be a problem with hostPort but the fix for that was merged 1 Jun 2017 (via the port-forwarded plugin) and so made it into k8s 1.7. |
Flannel+CNI+HostPort cannot work? |
Based on the changelog, hostPort/flannel works with kubernetes >1.9, which includes cni >0.6.0 |
[root@worker ~]# kubectl version It means kubernetes version is 1.9.2? |
I downloaded cni-plugins-amd64-v0.7.0-rc2.tgz from https://github.com/containernetworking/plugins/releases. |
With https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml, hostPort can work |
So to get this working using flannel with calico, I assume we need to use https://github.com/coreos/flannel-cni. @mumoshu how much do you know about the various network fabrics? My knowledge is a bit limited so I could work on some of this but need a little guidance about what we need to add. I hit this issue again today, I have a Daemon Set with some |
For some reason this worked in my previous tests with k8s 1.9.9 and canal self hosted but I checked again yesterday with kube-aws cb6766d and it seems hostPort is not working again. Not entirely sure why as the canal config looks fine. |
Nevermind, ignore my above comment - I've since found an unrelated configuration issue which made it look like this wasn't working but it was fine. I've re-confirmed all expected paths work:
|
According to kubernetes/kubernetes#23920 (comment) we will need to update versions of Calico and configuration to enable this on k8s 1.7. I'm not sure what if anything needs to change for flannel to also work.
The text was updated successfully, but these errors were encountered: