pods启动成功了,但是一直处于ContainerCreating状态,并报错缺少/etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt
一、在Centos7.4中 需要以下步骤
1.yum install -y *rhsm* //先安装这个
2.docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest 如果不行则需要按着3操作后再次pull,否则跳过3
3. wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm
rpm2cpio python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm | cpio -iv --to-stdout ./etc/rhsm/ca/redhat-uep.pem | tee /etc/rhsm/ca/redhat-uep.pem
参考方法 https://cloud.tencent.com/info/cfa019aa9db787d20c4b98515b578047.html
4. 重新创建然后使用 kubectl get pods ,发现:
NAME READY STATUS RESTARTS AGE
mysql-3s606 1/1 Running 0 1m
OK,终于启动了。。。。
————————————————
二、yaml终于搞定,结果发现RC启动了但是pods没有自动生成,参考别人的解决方法:解决办法是编辑/etc/kubernetes/apiserver 去除 KUBE_ADMISSION_CONTROL 中的 SecurityContextDeny,ServiceAccount ,并重启kube-apiserver.service服务。
# vim /etc/kubernetes/apiserver
KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,ResourceQuota"
# systemctl restart kube-apiserver.service
作者:JensenWong
链接:https://www.jianshu.com/p/e601d79357c6
————————————————
原文链接:https://blog.csdn.net/d7185540/java/article/details/80868816