首页 > 解决方案 > 容器卡在 Kubernetes 中创建

问题描述

我正在尝试为参展商创建部署,当我执行 kubectl apply 命令容器时卡在创建状态。当我描述它时,我收到以下错误。

注意:- 对于其他 pod 没有遇到任何问题,并且正在使用 flannel 网络。

无法创建 pod 沙箱:rpc 错误:code = Unknown desc = [无法为 pod“exhibitor-6fdcbdf9c-d7t6v”设置沙箱容器“0d459281ccc36f”网络:networkPlugin cni 无法设置 pod“exhibitor-6fdcbdf9c-d7t6v_default”网络: 获取 ClusterInformation 时出错:获取https://[10.96.0.1]:443/apis/crd.projectcalico.org/v1/clusterinformations/default : x509: 证书由未知机构签名(可能是因为“crypto/rsa: 验证错误”在尝试验证候选权威证书“kubernetes”时,未能清理 pod“exhibitor-6fdcb9c-dt6v”的沙盒容器“0d422ffb519a9a9be4dfbd9c6b235505f5a0e8181ccc36f”网络:networkPlugin cni 未能拆除 pod“exhibitor-6fdcbc-t6v_default”网络:获取 ClusterInformation 时出错:获取https://[10.96.0.1]:443/apis/crd.projectcalico.org/v1/clusterinformations/default : x509: 由未知机构签署的证书(可能是因为“crypto/rsa: 验证错误”,同时尝试验证候选人权威证书“kubernetes”)]

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.19.0 (f63a961c)
  creationTimestamp: null
  labels:
    io.kompose.service: exhibitor
  name: exhibitor
spec:
  progressDeadlineSeconds: 2147483647
  replicas: 1
  revisionHistoryLimit: 2147483647
  selector:
    matchLabels:
      io.kompose.service: exhibitor
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert
        kompose.version: 1.19.0 (f63a961c)
      creationTimestamp: null
      labels:
        io.kompose.service: exhibitor
    spec:
      containers:
      - image: netflixoss/exhibitor:1.5.2
        imagePullPolicy: IfNotPresent
        name: exhibitor
        ports:
        - containerPort: 2888
          hostPort: 2888
          protocol: TCP
        - containerPort: 2181
          hostPort: 2181
          protocol: TCP
        - containerPort: 3888
          hostPort: 3888
          protocol: TCP
        - containerPort: 8080
          hostPort: 8080
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
#      nodeSelector:
#        disktype: master
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
status: {}

When i execute the  kubectl get pods -n kube-system geeting the below things.

NAME                                        READY   STATUS              RESTARTS   AGE
coredns-66bff467f8-q2j55                    0/1     ContainerCreating   0          2d13h
coredns-66bff467f8-w2l7z                    0/1     ContainerCreating   0          2d13h
etcd-ip-172-16-176-201                      1/1     Running             2          2d13h
kube-apiserver-ip-172-16-176-201            1/1     Running             2          2d13h
kube-controller-manager-ip-172-16-176-201   1/1     Running             2          2d13h
kube-proxy-8bfvg                            1/1     Running             2          2d13h
kube-proxy-lwrd8                            1/1     Running             2          2d13h
kube-proxy-r6w9m                            1/1     Running             2          2d13h
kube-scheduler-ip-172-16-176-201            1/1     Running             2          2d13h

标签: kubernetes

解决方案


推荐阅读