Reading the Status of a Deployment
Function
This API is used to read the status of a specified Deployment.
URI
GET /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status
|
Parameter |
Description |
|---|---|
|
namespace |
Object name and auth scope, such as for teams and projects. |
|
name |
Name of the Deployment. |
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
pretty |
No |
If 'true', then the output is pretty printed. |
Request
N/A
Response
Response parameters
For the description about response parameters, see Table 79.
Example response
{
"kind": "Deployment",
"apiVersion": "apps/v1",
"metadata": {
"name": "deployment-test",
"namespace": "namespace-test",
"selfLink": "/apis/apps/v1/namespaces/namespace-test/deployments/deployment-test/status",
"uid": "777dce52-b186-11e8-8cb0-c81fbe371a17",
"resourceVersion": "5630865",
"generation": 1,
"creationTimestamp": "2018-09-06T03:39:32Z",
"labels": {
"app": "redis"
},
"annotations": {
"deployment.kubernetes.io/revision": "1"
},
"enable": true
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"app": "redis"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "redis"
},
"annotations": {
"cri.cci.io/container-type": "secure-container"
},
"enable": true
},
"spec": {
"containers": [
{
"name": "container-0",
"image": "redis",
"resources": {
"limits": {
"memory": "1Gi",
"cpu": "500m"
},
"requests": {
"cpu": "500m",
"memory": "1Gi"
}
},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"imagePullSecrets": [
{
"name": "imagepull-secret"
}
],
"schedulerName": "default-scheduler"
}
},
"strategy": {
"type": "RollingUpdate",
"rollingUpdate": {
"maxUnavailable": "25%",
"maxSurge": "25%"
}
},
"revisionHistoryLimit": 10,
"progressDeadlineSeconds": 600
},
"status": {
"observedGeneration": 1,
"replicas": 1,
"updatedReplicas": 1,
"readyReplicas": 1,
"availableReplicas": 1,
"conditions": [
{
"type": "Available",
"status": "True",
"lastUpdateTime": "2018-09-06T03:39:40Z",
"lastTransitionTime": "2018-09-06T03:39:40Z",
"reason": "MinimumReplicasAvailable",
"message": "Deployment has minimum availability."
},
{
"type": "Progressing",
"status": "True",
"lastUpdateTime": "2018-09-06T03:39:40Z",
"lastTransitionTime": "2018-09-06T03:39:32Z",
"reason": "NewReplicaSetAvailable",
"message": "ReplicaSet \"deployment-test-865578b586\" has successfully progressed."
}
]
}
}
Status Code
Table 3 describes the status code of this API.
|
Status Code |
Description |
|---|---|
|
200 |
This operation succeeds, and a Deployment resource object is returned. |
For more status codes, see Status Codes.
Last Article: Reading All Deployments Under a Namespace
Next Article: Reading the Scaling Operation of a Specified Deployment
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.