Describe Deployment output details Kubernetes

Spread the love

General output of a describe command

Name:                   nginx
Namespace:              default
CreationTimestamp:      Wed, 09 Jul 2025 09:26:49 +0200
Labels:                 app=nginx
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               app=nginx
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  app=nginx
  Containers:
   nginx:
    Image:         nginx
    Port:          <none>
    Host Port:     <none>
    Environment:   <none>
    Mounts:        <none>
  Volumes:         <none>
  Node-Selectors:  <none>
  Tolerations:     <none>
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   nginx-5869d7778c (1/1 replicas created)
Events:
  Type    Reason             Age   From                   Message
  ----    ------             ----  ----                   -------
  Normal  ScalingReplicaSet  4m7s  deployment-controller  Scaled up replica set nginx-5869d7778c from 0 to 1

🔹 Basic Metadata

FieldMeaningWhy It’s NeededK8s Context
NamenginxIdentifier for the deploymentUsed by kubectl, API, and internal references
NamespacedefaultLogical grouping of resourcesSeparates resources into isolated environments
CreationTimestampe.g. Wed, 09 Jul 2025 09:26:49 +0200When this deployment was createdUseful for auditing and lifecycle tracking
Labelsapp=nginxMetadata key-value used for selectionUsed by services/selectors to match pods
Annotationsdeployment.kubernetes.io/revision: 1Extra non-identifying metadataTracks deployment rollouts, history for rollback

🔹 Selector

FieldMeaningWhy It’s NeededK8s Context
Selectorapp=nginxMatches pods with the same labelDeployment uses this to manage the right pods

Important: Without this selector, Kubernetes wouldn’t know which pods are part of the deployment.


🔹 Replica Summary

FieldMeaningWhy It’s NeededK8s Context
1 desiredTarget number of pod replicasEnsures app has enough redundancy or capacity
1 updatedPods running latest configurationConfirms all pods are on current version
1 totalTotal number of pods managedUseful for monitoring
1 availableReady & healthy podsOnly these serve traffic
0 unavailablePods not ready or failedZero means healthy rollout

This helps Kubernetes maintain high availability through self-healing and replica control.


🔹 Deployment Strategy

FieldMeaningWhy It’s NeededK8s Context
StrategyTypeRollingUpdateUpdates pods graduallyPrevents downtime during upgrades
MinReadySeconds0Wait time before marking a pod “ready”Delays traffic routing until pod is fully warm
RollingUpdateStrategy25% maxUnavailable, 25% maxSurgeControls batch size of updateEnsures partial updates with fallback ability

This provides graceful rollout with rollback support if needed.


🔹 Pod Template

FieldMeaningWhy It’s NeededK8s Context
Labelsapp=nginxInherited by podsEnsures service/deployment mapping
ContainernginxContainer nameFor container-specific logging and mgmt
ImagenginxDocker imageSource of the application code
Port/Host PortNot defined hereUse services to expose ports
Environment/MountsNo env variables or volumesUsed for config, secrets, persistence

This template is cloned for each pod — defines how each pod is built.


🔹 Node Scheduling

FieldMeaningWhy It’s NeededK8s Context
Node-SelectorsNo restrictionsCan schedule on any node
TolerationsNo taints toleratedUseful for scheduling on tainted nodes (e.g. GPU, spot instances)

This controls where pods can be scheduled across the cluster.


🔹 Conditions (Deployment Status)

FieldMeaningWhy It’s NeededK8s Context
Available: TrueMin replicas readyDeployment is serving traffic
Progressing: TrueNew ReplicaSet readyIndicates healthy rollout

🛡 These fields are checked by Kubernetes to decide if rollback is needed.


🔹 Replica Sets

FieldMeaningWhy It’s NeededK8s Context
OldReplicaSetsNo previous rolloutOlder versions exist here if rollout occurs
NewReplicaSetnginx-5869d7778c (1/1)New pods from current templateControlled by Deployment

ReplicaSets are managed by Deployment to ensure desired number of pods are running.


🔹 Events

FieldMeaningWhy It’s NeededK8s Context
Type: NormalNormal behavior
Reason: ScalingReplicaSetScaling action triggered
MessageScaled up replica set nginx-5869d7778c from 0 to 1Logs automatic pod creation

Events are useful for debugging and audit trails.


How This Fits into Kubernetes Architecture

  • Deployment: Defines desired state (e.g. image version, replicas)
  • ReplicaSet: Maintains that state — ensures correct number of pods
  • Pod: Runs the actual application container (nginx)
  • Service (optional): Would expose these pods to users or other services

That’s all for this post. Cheers and Peace out!!!

Leave a Reply

Your email address will not be published. Required fields are marked *