I'm new to Kubernetes.
(我是Kubernetes的新手。)
I try to scale my pods. (我尝试缩放我的豆荚。)
First I started 3 pods: (首先,我启动了3个Pod:)
./cluster/kubectl.sh run my-nginx --image=nginx --replicas=3 --port=80
There were starting 3 pods.
(开始有3个豆荚。)
First I tried to scale up/down by using a replicationcontroller but this did not exist. (首先,我尝试使用复制控制器来按比例放大/缩小,但这并不存在。)
It seems to be a replicaSet now. (现在好像是一个resetSet。)
./cluster/kubectl.sh get rs
NAME DESIRED CURRENT AGE
my-nginx-2494149703 3 3 9h
I tried to change the amount of replicas described in my replicaset:
(我尝试更改副本集中描述的副本数量:)
./cluster/kubectl.sh scale --replicas=5 rs/my-nginx-2494149703
replicaset "my-nginx-2494149703" scaled
But I still see my 3 original pods
(但我仍然看到我的3个原始豆荚)
./cluster/kubectl.sh get pods
NAME READY STATUS RESTARTS AGE
my-nginx-2494149703-04xrd 1/1 Running 0 9h
my-nginx-2494149703-h3krk 1/1 Running 0 9h
my-nginx-2494149703-hnayu 1/1 Running 0 9h
I would expect to see 5 pods.
(我希望看到5个豆荚。)
./cluster/kubectl.sh describe rs/my-nginx-2494149703
Name: my-nginx-2494149703
Namespace: default
Image(s): nginx
Selector: pod-template-hash=2494149703,run=my-nginx
Labels: pod-template-hash=2494149703
run=my-nginx
Replicas: 3 current / 3 desired
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Why isn't it scaling up?
(为什么不扩大规模?)
Do I also have to change something in the deployment? (我是否还需要更改部署中的某些内容?)
I see something like this when I describe my rs after scaling up: (Here I try to scale from one running pod to 3 running pods).
(在放大后描述我的rs时,我会看到类似的内容:(在这里,我尝试从一个正在运行的Pod缩放到三个正在运行的Pod)。)
But it remains one running pod. (但是它仍然是一个运行的吊舱。)
The other 2 are started and killed immediatly (其他2个立即启动并被杀死)
34s 34s 1 {replicaset-controller } Normal SuccessfulCreate Created pod: my-nginx-1908062973-lylsz
34s 34s 1 {replicaset-controller } Normal SuccessfulCreate Created pod: my-nginx-1908062973-5rv8u
34s 34s 1 {replicaset-controller } Normal SuccessfulDelete Deleted pod: my-nginx-1908062973-lylsz
34s 34s 1 {replicaset-controller } Normal SuccessfulDelete Deleted pod: my-nginx-1908062973-5rv8u
ask by DenCowboy translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…