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

[bitnami/multus-cni] failed to get context for the kubeconfig #30606

Open
brightdroid opened this issue Nov 24, 2024 · 3 comments
Open

[bitnami/multus-cni] failed to get context for the kubeconfig #30606

brightdroid opened this issue Nov 24, 2024 · 3 comments
Assignees
Labels
multus-cni tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@brightdroid
Copy link

Name and Version

bitnamicharts/multus-cni:2.1.19

What architecture are you using?

amd64

What steps will reproduce the bug?

  • installed k3s v1.29.10+k3s1
  • installed multus with below values
  • start netshot debug pod: kubectl netshoot run tmp-shell
  • inspect pod "tmp-shell" (which did not start)

Are you using any custom parameters or values?

fullnameOverride: multus
hostCNIBinDir: /var/lib/rancher/k3s/data/cni/
hostCNINetDir: /var/lib/rancher/k3s/agent/etc/cni/net.d

What is the expected behavior?

No response

What do you see instead?

Logs from "tmp-shell" pod
Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "3574ecbded3a47def3133b1d8a783035a1a63f6d95ba4c4a3845c5cf24c78614": plugin type="multus" failed (add): Multus: error getting k8s client: GetK8sClient: failed to get context for the kubeconfig /etc/cni/net.d/multus.d/multus.kubeconfig: stat /etc/cni/net.d/multus.d/multus.kubeconfig: no such file or directory

Additional information

Logs from multus pod:

multus-wwvcj multus-cni kubeconfig is created in /bitnami/multus-cni/host/etc/cni/net.d/multus.d/multus.kubeconfig                                                                                                                                           
multus-wwvcj multus-cni kubeconfig file is created.                                                                                                                                                                                                          
multus-wwvcj multus-cni master capabilities is get from conflist                                                                                                                                                                                             
multus-wwvcj multus-cni multus config file is created.                                                                                                                                                                                                       
multus-wwvcj generate-kubeconfig multus multus copy succeeded!                                                                                                                                                                                               
@brightdroid brightdroid added the tech-issues The user has a technical issue about an application label Nov 24, 2024
@github-actions github-actions bot added the triage Triage is needed label Nov 24, 2024
@javsalgar javsalgar changed the title multus: failed to get context for the kubeconfig [bitnami/multus-cni] failed to get context for the kubeconfig Nov 25, 2024
@javsalgar
Copy link
Contributor

Hi,

This is strange, because looking at the logs the kubeconfig should be there. Could you try entering the container with kubectl exec and verify that it created the kubeconfig file? If so, maybe the hostCNINetDir is incorrect

@brightdroid
Copy link
Author

I think the multus daemonset use the wrong paths.

  • the multus pods created the kubeconfig on the hosts in /var/lib/rancher/k3s/agent/etc/cni/net.d/multus.d/multus.kubeconfig (as expected)
  • the multus pods have the host path /var/lib/rancher/k3s/agent/etc/cni/net.d mounted at /bitnami/multus-cni/host/etc/cni/net.d

So the multus pods should use the path /bitnami/multus-cni/host/etc/cni/net.d/multus.d/multus.kubeconfig.

@javsalgar
Copy link
Contributor

Could you try changing the path in the YAML to confirm this? If so, as you spotted the issue, would you like to submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multus-cni tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants