Readiness probe success or not determine the pod ready or not ready. If I set the .spec.minReadySeconds = 60
and the Readiness probe is success(.readinessProbe.initialDelaySeconds = 1
), so when we created the deployment more than 1 second less than 60 seconds the pod enter the ready status but the deployment's 'status' like below:
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
I found that we can access the resource from container by type nodeport, so if there are some pod unavailable in the deployment, how it could affect me?