问题重现
代码语言:javascript复制[root@ltd kub]# kubectl create -f mysql-rc.yaml
replicationcontroller "mysql" created
[root@ltd kub]# kubectl get rc
NAME DESIRED CURRENT READY AGE
mysql 1 0 0 4s
[root@ltd kub]# kubectl get pods
No resources found.
解决办法:
代码语言:javascript复制[root@ltd tomcat]# vi /etc/kubernetes/apiserver
……
KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota"
#去掉ServiceAccount,保存
再看:
代码语言:javascript复制[root@ltd ~]# kubectl get pods
NAME READY STATUS RESTARTS AGE
mysql-36gjv 1/1 Running 0 10s
问题解决。