我学习Kubernetes和对面的一个问题来了,想检查是否有人碰到它,kubernetes隐藏副本集?
[email protected]:~/rc$ kubectl get rs ### don’t see any replica set
[email protected]:~/rc$
[email protected]:~/rc$
[email protected]:~/rc$ kubectl get pod
NAME READY STATUS RESTARTS AGE
bigwebstuff-673k9 1/1 Running 0 7m
bigwebstuff-cs7i3 1/1 Running 0 7m
bigwebstuff-egbqd 1/1 Running 0 7m
[email protected]:~/rc$
[email protected]:~/rc$
[email protected]:~/rc$ kubectl delete pod bigwebstuff-673k9 bigwebstuff-cs7i3 #### delete pods
pod "bigwebstuff-673k9" deleted
pod "bigwebstuff-cs7i3" deleted
[email protected]:~/rc$
[email protected]:~/rc$ kubectl get pod #### the deleted pods regenerated
NAME READY STATUS RESTARTS AGE
bigwebstuff-910m9 1/1 Running 0 6s
bigwebstuff-egbqd 1/1 Running 0 8m
bigwebstuff-fksf6 1/1 Running 0 6s
你看到被删除的豆荚再生,虽然我不能找到副本集,就好像隐藏的复制集合存在于某处。
3个豆荚从rc.yaml文件启动如下,
[email protected]:~/rc$ cat webrc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: bigwebstuff
labels:
name: bigwebstuff
spec:
replicas: 3
selector:
run: testweb
template:
metadata:
labels:
run: testweb
spec:
containers:
- name: podweb
image: nginx
ports:
- containerPort: 80
但它并没有显示我用山药文件来创建荚后。
有关如何找到隐藏副本集的任何想法?或者为什么豆荚再生?