Bootstrap

k8s常见报错

问题一:no kind “Deployment“ is registered for version “apps/v1“
原因:这是版本的问题,你现在用的k8s版本比较新,使用的是extensions/v1beta1,所以yaml修改一下就行:

apiVersion: extensions/v1beta1

查看api解释器版本:

kubectl api-versions

问题二:pod status为ContainerCreating

1.查看pod的描述信息

kubectl -s 192.168.247.100:8999  describe pod mysql-4144028371-8mh6p

在这里插入图片描述
需要在node节点上操作,依次操作四步:

yum install -y *rhsm*

cd /etc/docker/certs.d/registry.access.redhat.com/

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

node节点验证:

docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest

无报错则表示成功

;