calico: Images in custom registry: CreateContainerError
Here we are using calico as network plugin for k8s based on KB: https://docs.tigera.io/calico/latest/operations/image-options/alternate-registry by using local registry as calico dockers images. We adjust based on that KB in tigera-operator.yaml and custom-resources.yaml. But calico related pods can’t be in normal status after apply custom-resources.yaml. Below are the detail error info, any suggestion?
[root@k8sma manifests]# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
calico-system calico-kube-controllers-576f6b4cc-kzbdp 0/1 Pending 0 11m
calico-system calico-node-vh5j4 0/1 Init:CreateContainerError 0 11m
calico-system calico-typha-c8775554c-lrd6c 0/1 CreateContainerError 0 11m
calico-system csi-node-driver-6fblr 0/2 ContainerCreating 0 11m
kube-system coredns-7b5944fdcf-rmgxx 0/1 Pending 0 11m
kube-system coredns-7b5944fdcf-spc2h 0/1 Pending 0 11m
kube-system etcd-k8sma 1/1 Running 38 12m
kube-system kube-apiserver-k8sma 1/1 Running 43 12m
kube-system kube-controller-manager-k8sma 1/1 Running 46 12m
kube-system kube-proxy-tbcxw 1/1 Running 0 11m
kube-system kube-scheduler-k8sma 1/1 Running 45 12m
tigera-operator tigera-operator-5847fb7754-f67jj 1/1 Running 0 11m
[root@k8sma manifests]# kubectl describe pod calico-typha-c8775554c-lrd6c -n calico-system
Name: calico-typha-c8775554c-lrd6c
Namespace: calico-system
Priority: 2000000000
Priority Class Name: system-cluster-critical
Service Account: calico-typha
Node: k8sma/192.168.31.111
Start Time: Wed, 17 Jul 2024 14:26:37 +0800
Labels: app.kubernetes.io/name=calico-typha
k8s-app=calico-typha
pod-template-hash=c8775554c
Annotations: hash.operator.tigera.io/system: fdde45054a8ae4f629960ce37570929502e59449
tigera-operator.hash.operator.tigera.io/tigera-ca-private: bc1830f9e6cb4590e3f0da8a12e44e08ecb12eaa
tigera-operator.hash.operator.tigera.io/typha-certs: 84e83e8f72477d38dcd30a197b85919b25f006ed
Status: Pending
IP: 192.168.31.111
IPs:
IP: 192.168.31.111
Controlled By: ReplicaSet/calico-typha-c8775554c
Containers:
calico-typha:
Container ID:
Image: localhost:5000/calico/typha:v3.28.0
Image ID:
Port: 5473/TCP
Host Port: 5473/TCP
SeccompProfile: RuntimeDefault
State: Waiting
Reason: CreateContainerError
Ready: False
Restart Count: 0
Liveness: http-get http://localhost:9098/liveness delay=0s timeout=10s period=60s #success=1 #failure=3
Readiness: http-get http://localhost:9098/readiness delay=0s timeout=10s period=30s #success=1 #failure=3
Environment:
TYPHA_LOGSEVERITYSCREEN: info
TYPHA_LOGFILEPATH: none
TYPHA_LOGSEVERITYSYS: none
TYPHA_CONNECTIONREBALANCINGMODE: kubernetes
TYPHA_DATASTORETYPE: kubernetes
TYPHA_HEALTHENABLED: true
TYPHA_HEALTHPORT: 9098
TYPHA_K8SNAMESPACE: calico-system
TYPHA_CAFILE: /etc/pki/tls/certs/tigera-ca-bundle.crt
TYPHA_SERVERCERTFILE: /typha-certs/tls.crt
TYPHA_SERVERKEYFILE: /typha-certs/tls.key
TYPHA_FIPSMODEENABLED: false
TYPHA_SHUTDOWNTIMEOUTSECS: 300
TYPHA_CLIENTCN: typha-client
KUBERNETES_SERVICE_HOST: 10.96.0.1
KUBERNETES_SERVICE_PORT: 443
Mounts:
/etc/pki/tls/cert.pem from tigera-ca-bundle (ro,path="ca-bundle.crt")
/etc/pki/tls/certs from tigera-ca-bundle (ro)
/typha-certs from typha-certs (ro)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-ptcm5 (ro)
Conditions:
Type Status
PodReadyToStartContainers True
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
tigera-ca-bundle:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: tigera-ca-bundle
Optional: false
typha-certs:
Type: Secret (a volume populated by a Secret)
SecretName: typha-certs
Optional: false
kube-api-access-ptcm5:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: kubernetes.io/os=linux
Tolerations: :NoSchedule op=Exists
:NoExecute op=Exists
CriticalAddonsOnly op=Exists
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 12m default-scheduler Successfully assigned calico-system/calico-typha-c8775554c-lrd6c to k8sma
Warning FailedMount 12m kubelet MountVolume.SetUp failed for volume "tigera-ca-bundle" : failed to sync configmap cache: timed out waiting for the condition
Warning Failed 12m kubelet Error: failed to generate container "9a30eed862e93fc8248b64e0bd5d7de2fe090d24a618f810476f1e20508451e3" spec: failed to generate spec: no command specified
Warning Failed 12m kubelet Error: failed to generate container "43d0f89a95da40b10f82636bfc37e7da5767643495df669dd6bc8acafbca829c" spec: failed to generate spec: no command specified
Warning Failed 12m kubelet Error: failed to generate container "a67cbab6ceec0ed297105cdac05275306e06cad1b46480775c5c5cf82b88bcc8" spec: failed to generate spec: no command specified
Warning Failed 12m kubelet Error: failed to generate container "47551a347907b903f4d840a06f49366013147f985940c4dfa798d81b8c898f01" spec: failed to generate spec: no command specified
Warning Failed 11m kubelet Error: failed to generate container "59093a5b73bafab6fb02c4d1bbae407600ecb074bb68ecd7e9b19ead8605db69" spec: failed to generate spec: no command specified
Warning Failed 11m kubelet Error: failed to generate container "83ff673c79fb6437472347b8448e73bdff761f0a3a90ff112c1990c0a9a87197" spec: failed to generate spec: no command specified
Warning Failed 11m kubelet Error: failed to generate container "3071ec15367613b8e0ba5092edbb008124a2df6b5595cc217970b82f8e41cd6d" spec: failed to generate spec: no command specified
Warning Failed 11m kubelet Error: failed to generate container "77b8c8428e6a2b1499c5461cc57ae79dc1aae6cac16371c5125d056fce94892c" spec: failed to generate spec: no command specified
Warning Failed 11m kubelet Error: failed to generate container "ff4b01d90db08f46f2a0f24b1cd9e66f2bcad7091b1eee1ef6e38996b605c1c6" spec: failed to generate spec: no command specified
Warning Failed 10m (x3 over 10m) kubelet (combined from similar events): Error: failed to generate container "37eafe5c181ee2edb9cc0559622ed142c75064ba72ba37ffc395d57cf4c43a43" spec: failed to generate spec: no command specified
Normal Pulled 2m25s (x48 over 12m) kubelet Container image "localhost:5000/calico/typha:v3.28.0" already present on machine
[root@k8sma manifests]# kubectl describe pod csi-node-driver-6fblr -n calico-system
Name: csi-node-driver-6fblr
Namespace: calico-system
Priority: 2000001000
Priority Class Name: system-node-critical
Service Account: default
Node: k8sma/192.168.31.111
Start Time: Wed, 17 Jul 2024 14:26:39 +0800
Labels: app.kubernetes.io/name=csi-node-driver
controller-revision-hash=74fbb6df98
k8s-app=csi-node-driver
name=csi-node-driver
pod-template-generation=1
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: DaemonSet/csi-node-driver
Containers:
calico-csi:
Container ID:
Image: localhost:5000/calico/csi:v3.28.0
Image ID:
Port: <none>
Host Port: <none>
SeccompProfile: RuntimeDefault
Args:
--nodeid=$(KUBE_NODE_NAME)
--loglevel=$(LOG_LEVEL)
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment:
LOG_LEVEL: warn
KUBE_NODE_NAME: (v1:spec.nodeName)
Mounts:
/csi from socket-dir (rw)
/var/lib/kubelet from kubelet-dir (rw)
/var/run from varrun (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-rjd5s (ro)
csi-node-driver-registrar:
Container ID:
Image: localhost:5000/calico/node-driver-registrar:v3.28.0
Image ID:
Port: <none>
Host Port: <none>
SeccompProfile: RuntimeDefault
Args:
--v=5
--csi-address=$(ADDRESS)
--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment:
ADDRESS: /csi/csi.sock
DRIVER_REG_SOCK_PATH: /var/lib/kubelet/plugins/csi.tigera.io/csi.sock
KUBE_NODE_NAME: (v1:spec.nodeName)
Mounts:
/csi from socket-dir (rw)
/registration from registration-dir (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-rjd5s (ro)
Conditions:
Type Status
PodReadyToStartContainers False
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
varrun:
Type: HostPath (bare host directory volume)
Path: /var/run
HostPathType:
kubelet-dir:
Type: HostPath (bare host directory volume)
Path: /var/lib/kubelet
HostPathType: Directory
socket-dir:
Type: HostPath (bare host directory volume)
Path: /var/lib/kubelet/plugins/csi.tigera.io
HostPathType: DirectoryOrCreate
registration-dir:
Type: HostPath (bare host directory volume)
Path: /var/lib/kubelet/plugins_registry
HostPathType: Directory
kube-api-access-rjd5s:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: kubernetes.io/os=linux
Tolerations: :NoSchedule op=Exists
:NoExecute op=Exists
CriticalAddonsOnly op=Exists
node.kubernetes.io/disk-pressure:NoSchedule op=Exists
node.kubernetes.io/memory-pressure:NoSchedule op=Exists
node.kubernetes.io/not-ready:NoExecute op=Exists
node.kubernetes.io/pid-pressure:NoSchedule op=Exists
node.kubernetes.io/unreachable:NoExecute op=Exists
node.kubernetes.io/unschedulable:NoSchedule op=Exists
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 13m default-scheduler Successfully assigned calico-system/csi-node-driver-6fblr to k8sma
Warning NetworkNotReady 3m45s (x302 over 13m) kubelet network is not ready: container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (9 by maintainers)
Most upvoted comments
+1
huanghaiqing1 on Aug 19, 2024