就绪探测成功与否确定 pod 就绪与否。如果我设置了.spec.minReadySeconds = 60
并且Readiness探针是success( .readinessProbe.initialDelaySeconds = 1
),那么当我们创建部署超过1秒不到60秒时,Pod进入就绪状态,但部署的“状态”如下所示:
kubectl describe deployment readiness-minreadyseconds
Name: readiness-minreadyseconds
Namespace: default
CreationTimestamp: Wed, 21 Sep 2016 10:34:42 +0800
Labels: add=readiness-minreadyseconds
Selector: name=readiness-minreadyseconds
Replicas: 2 updated | 2 total | 0 available | 2 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 45
RollingUpdateStrategy: 1 max unavailable, 1 max surge
OldReplicaSets: <none>
NewReplicaSet: readiness-minreadyseconds-536553145 (2/2 replicas created)
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
2s 2s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set readiness-minreadyseconds-536553145 to 2
我发现我们可以通过 nodeport 类型从容器中访问资源,所以如果部署中有一些 pod 不可用,它会对我产生什么影响?