Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to set --network-plugin=cni with docker mode #255

Closed
elvizlai opened this issue Mar 22, 2019 · 4 comments
Closed

Need to set --network-plugin=cni with docker mode #255

elvizlai opened this issue Mar 22, 2019 · 4 comments
Assignees
Labels
kind/question No code change, just asking/answering a question
Milestone

Comments

@elvizlai
Copy link

elvizlai commented Mar 22, 2019

Describe the bug
when using docker, Pod Ip not managed by CNI plugin.

To Reproduce

1、wget https://github.com/containernetworking/plugins/releases/download/v0.7.5/cni-plugins-amd64-v0.7.5.tgz && tar zxvf cni-plugins-amd64-v0.7.5.tgz && mkdir -p /opt/cni/bin && mv * /opt/cni/bin/
2、install docker lastest version
3、using cmd `curl -sfL https://get.k3s.io | sh -s - --docker --no-flannel` to start k3s.
4、kubectl apply -f https://github.com/coreos/flannel/raw/master/Documentation/kube-flannel.yml
5、start ANY k8s example.

Expected behavior
Pod IP should be CNI related, not docker default 172.17.xxx

Additional context
Is there any way to indicate --network-plugin=cni ?

@erikwilson erikwilson added the kind/question No code change, just asking/answering a question label Mar 25, 2019
@mortenlj
Copy link
Contributor

You can use the --kubelet-arg option to add an argument to kubelet:

k3s agent --docker --kubelet-arg network-plugin=cni

@deniseschannon
Copy link

@elvizlai Can you try with v0.5.0-rc3 to see if it's fixed for you?

@dnoland1
Copy link
Contributor

dnoland1 commented May 4, 2019

Tested with v0.5.0-rc4. Ran steps above to download plugins, install docker, install k3s, and apply flannel plugin. Launched a test ubuntu pod and it appeared to get a pod IP (10.42.0.0/16):

root@k3s-node1:~# k3s kubectl get pods -o wide
NAME         READY   STATUS    RESTARTS   AGE   IP           NODE        NOMINATED NODE   READINESS GATES
ubuntu-pod   1/1     Running   0          31s   10.42.0.15   k3s-node1   <none>           <none>

@erikwilson
Copy link
Contributor

Thanks for testing @dnoland1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question No code change, just asking/answering a question
Projects
None yet
Development

No branches or pull requests

7 participants