multus-cni: Pod cannot initialize with v3.7.2 version code,its status stay with ContainerCreating and no longer in progress
Pod cannot initialize when using the latest version of multus
error msg:
Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container “5bcff91f4f77998c5890c23ab268122d2d6aef454b365e0c67cf5105d94be9d2” network for pod “test-sriov-5f65d5485b-5js49”: networkPlugin cni failed to set up pod “test-sriov-5f65d5485b-5js49_default” network: Multus: [default/test-sriov-5f65d5485b-5js49]: error loading k8s delegates k8s args: TryLoadPodDelegates: error in getting k8s network for pod: GetNetworkDelegates: failed getting the delegate: getKubernetesDelegate: failed to get a ResourceClient instance: getKubeletClient: error ge tting pod resources from client: getPodResources: failed to list pod resources, &{0xc0004caa80}.Get(_) = _, rpc error: code = Unimplemented desc = unknown service v1.PodResourcesLister
pod stay with the containerCreating status

pod describe error message:

However it works well when I use the image:”ghcr.io/k8snetworkplumbingwg/multus-cni:stable“
k8s version: 1.19 multus code tag:v3.7.2
network-attachment-definition yaml:
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
annotations:
k8s.v1.cni.cncf.io/resourceName: virtaitech.com/sriov_net
creationTimestamp: "2021-07-07T08:48:09Z"
generation: 1
name: sriov-net1
namespace: default
resourceVersion: "60625480"
selfLink: /apis/k8s.cni.cncf.io/v1/namespaces/default/network-attachment-definitions/sriov-net1
uid: 714b96cd-9a66-46a8-ad55-d17a1080e80e
spec:
config: '{ "type": "sriov", "cniVersion": "0.3.1", "name": "sriov-network", "ipam":
{ "type": "cni-ipam-etcd", "subnet": "10.56.225.0/24", "etcdConfig": { "etcdURL":
"https://10.10.10.214:2379", "etcdCertFile": "/etc/cni/net.d/etcd.pem", "etcdKeyFile":
"/etc/cni/net.d/etcd-key.pem", "etcdTrustedCAFileFile": "/etc/cni/net.d/etcd-ca.pem"
}, "routes": [{ "dst": "0.0.0.0/0" }], "gateway": "10.56.225.1" } }'
pod deploy yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-sriov
labels:
app: test-sriov
spec:
replicas: 1
selector:
matchLabels:
app: test-sriov
template:
metadata:
labels:
app: test-sriov
annotations:
k8s.v1.cni.cncf.io/networks: sriov-net1
spec:
nodeSelector:
kubernetes.io/hostname: qa-4
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: test-sriov
namespaces:
- default
topologyKey: kubernetes.io/hostname
containers:
- name: appcntr1
image: phlak/iperf
imagePullPolicy: IfNotPresent
command: [ "/bin/sh", "-c", "--" ]
args: [ "while true; do sleep 300000; done;" ]
securityContext:
capabilities:
add: ["NET_ADMIN"]
resources:
requests:
virtaitech.com/sriov_net: '1'
limits:
virtaitech.com/sriov_net: '1'
env:
- name: CAP_ARGS
value: '{ "portMappings": [ { "hostPort": 5002, "containerPort": 5001, "protocol": "tcp" } ]}'
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 21 (7 by maintainers)
It can work with 3.7.1 version,maybe some problem introduced in 3.7.2
This saved my day. For Kubernetes
v1.18,v.3.7.1ofMultusworks but any version above that produces the reported issue.