Skip to contentমূল লেখায় যান

Topic 09 · DevOps & Cloudটপিক 09 · DevOps & Cloud

Kubernetes Basics

This page is about the first Kubernetes objects that a tester meets: Pods, ReplicaSets, and Deployments, how Kubernetes keeps them in the state that you ask for, and how to watch a rollout, break it on purpose, and roll it back, with a practice run on a local cluster. It builds on Docker Basics.

16 min read16 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 16 sources16টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Desired state and a rolling updateকাঙ্ক্ষিত অবস্থা আর রোলিং আপডেট

Change an image and watch a new ReplicaSet replace Pods one step at a time. Then only scale, and see that no new ReplicaSet appears.image বদলান আর দেখুন একটা নতুন ReplicaSet ধাপে ধাপে Pod বদলে দিচ্ছে। তারপর শুধু সংখ্যা বাড়ান, দেখুন নতুন ReplicaSet আসে না।

3 min3 মিনিট7 steps7টি ধাপ
  • Desiredকাঙ্ক্ষিত3
  • Readyপ্রস্তুত0 / 3
  • ReplicaSetsReplicaSet সংখ্যা0
DeploymentDeploymentnginxnginxspec.replicas: 3spec.replicas: 3image: nginx:1.14.2image: nginx:1.14.2ready 0 / 3প্রস্তুত 0 / 3ReplicaSetReplicaSet……not yetএখনো নেইReplicaSetReplicaSet……not yetএখনো নেইPod: green = ready, yellow = startingPod: সবুজ = প্রস্তুত, হলুদ = চালু হচ্ছে

You’ll learnআপনি শিখবেন

  • Desired state lives in the specকাঙ্ক্ষিত অবস্থা spec-এ থাকে✓
  • A ReplicaSet keeps the Pod countReplicaSet Pod-এর সংখ্যা ধরে রাখে
  • Only a template change starts a rolloutশুধু template বদলালে rollout শুরু হয়
  • A rollout swaps ReplicaSets; scaling does notrollout ReplicaSet বদলায়; scale বদলায় না

What it is

Kubernetes. Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services Source 1সোর্স 1. It facilitates both declarative configuration and automation Source 1সোর্স 1. Among other things, Kubernetes provides:

  • Service discovery and load balancing. Kubernetes can expose a container using a DNS name or its own IP address Source 1সোর্স 1.
  • Automated rollouts and rollbacks. You describe the desired state for your deployed containers, and Kubernetes can change the actual state to the desired state at a controlled rate Source 1সোর্স 1.
  • Self-healing. Kubernetes restarts containers that fail, replaces containers, kills containers that don't respond to your user-defined health check, and doesn't advertise them to clients until they are ready to serve Source 1সোর্স 1.

The first objects.

ObjectWhat it is
PodThe smallest deployable unit of computing that you can create and manage in Kubernetes: a group of one or more containers, with shared storage and network resources, and a specification for how to run the containers Source 3সোর্স 3
ReplicaSetAn object whose purpose is to maintain a stable set of replica Pods running at any given time Source 4সোর্স 4
DeploymentAn object that provides declarative updates for Pods and ReplicaSets Source 5সোর্স 5
LabelA key/value pair that is attached to an object such as a Pod Source 6সোর্স 6
NamespaceA mechanism for isolating groups of resources within a single cluster Source 7সোর্স 7

The "one-container-per-Pod" model is the most common Kubernetes use case: you can think of a Pod as a wrapper around a single container Source 3সোর্স 3. Kubernetes manages Pods rather than managing the containers directly Source 3সোর্স 3.

The tools. kubectl is the command line tool for communicating with a Kubernetes cluster's control plane, using the Kubernetes API Source 11সোর্স 11. kind is a tool for running local Kubernetes clusters using Docker container "nodes" Source 15সোর্স 15. kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI Source 15সোর্স 15.

সহজ English

Kubernetes. Kubernetes is an open source platform for managing workloads and services that run in containers Source 1সোর্স 1. It is portable and can be extended Source 1সোর্স 1. It supports both declarative configuration and automation Source 1সোর্স 1. Among other things, Kubernetes gives you:

  • Finding apps and sharing the load. Kubernetes can make a container reachable by a DNS name or by its own IP address Source 1সোর্স 1.
  • Rollouts and rollbacks. You describe the state that you want, and Kubernetes can move the real state toward it at a controlled pace Source 1সোর্স 1.
  • Self-healing. Kubernetes restarts containers that fail and replaces containers. It kills a container that does not answer your health check, and does not advertise a container to clients until it is ready to serve Source 1সোর্স 1.

The first objects.

ObjectWhat it is
PodThe smallest unit that you can create and manage in Kubernetes: one or more containers that share storage and network, and the instructions for running them Source 3সোর্স 3
ReplicaSetKeeps a stable set of replica Pods running at any given time Source 4সোর্স 4
DeploymentGives declarative updates for Pods and ReplicaSets Source 5সোর্স 5
LabelA key and a value attached to an object, such as a Pod Source 6সোর্স 6
NamespaceA way to keep groups of resources apart inside one cluster Source 7সোর্স 7

Most often, a Pod runs one container: think of the Pod as a wrapper around it Source 3সোর্স 3. Kubernetes manages the Pods, not the containers directly Source 3সোর্স 3.

The tools. kubectl is the command line tool that talks to a cluster's control plane through the Kubernetes API Source 11সোর্স 11. kind runs a local Kubernetes cluster whose "nodes" are Docker containers Source 15সোর্স 15. kind was made mainly to test Kubernetes itself, but you can also use it to develop on your own computer, or in CI Source 15সোর্স 15.

বাংলা ব্যাখ্যা

Kubernetes। Kubernetes হলো containerized workload আর service পরিচালনার জন্য একটা portable, extensible, open source platform Source 1সোর্স 1। এটা declarative configuration আর automation, দুটোই সহজ করে Source 1সোর্স 1। অন্যান্য সুবিধার মধ্যে Kubernetes দেয়:

  • Service discovery আর load balancing। Kubernetes একটা container-কে একটা DNS নাম বা তার নিজের IP address দিয়ে expose করতে পারে Source 1সোর্স 1।
  • Automated rollout আর rollback। আপনি deploy করা container-গুলোর desired state বর্ণনা করেন, আর Kubernetes নিয়ন্ত্রিত গতিতে actual state-কে desired state-এ বদলাতে পারে Source 1সোর্স 1।
  • Self-healing। Kubernetes ফেল করা container restart করে, container replace করে, আপনার নির্ধারিত health check-এ সাড়া না দেওয়া container বন্ধ করে, আর container serve করার জন্য প্রস্তুত না হওয়া পর্যন্ত client-দের কাছে সেটা প্রচার করে না Source 1সোর্স 1।

প্রথম object-গুলো।

Objectএটা কী
PodKubernetes-এ তৈরি ও পরিচালনা করা যায় এমন সবচেয়ে ছোট deployable computing একক: এক বা একাধিক container-এর একটা group, shared storage ও network resource-সহ, আর container-গুলো কীভাবে চলবে তার একটা specification Source 3সোর্স 3
ReplicaSetএমন একটা object, যার উদ্দেশ্য যেকোনো সময়ে replica Pod-এর একটা stable set চালু রাখা Source 4সোর্স 4
Deploymentএমন একটা object, যা Pod আর ReplicaSet-এর জন্য declarative update দেয় Source 5সোর্স 5
LabelPod-এর মতো একটা object-এর সাথে যুক্ত একটা key/value জোড়া Source 6সোর্স 6
Namespaceএকটা cluster-এর ভেতরে resource-এর group-গুলো আলাদা রাখার একটা ব্যবস্থা Source 7সোর্স 7

"one-container-per-Pod" model হলো Kubernetes-এর সবচেয়ে প্রচলিত ব্যবহার: Pod-কে একটা single container-এর wrapper হিসেবে ভাবতে পারেন Source 3সোর্স 3। Kubernetes সরাসরি container নয়, Pod পরিচালনা করে Source 3সোর্স 3।

টুলগুলো। kubectl হলো Kubernetes API ব্যবহার করে একটা Kubernetes cluster-এর control plane-এর সাথে যোগাযোগের command line tool Source 11সোর্স 11। kind হলো Docker container "node" দিয়ে local Kubernetes cluster চালানোর একটা tool Source 15সোর্স 15। kind মূলত Kubernetes নিজেকে test করার জন্য বানানো, তবে local development বা CI-তেও ব্যবহার করা যায় Source 15সোর্স 15।

How it works

Desired state. A Kubernetes object is a "record of intent": once you create the object, the Kubernetes system will constantly work to ensure that the object exists Source 2সোর্স 2. By creating an object, you tell Kubernetes what you want your cluster's workload to look like: this is your cluster's desired state Source 2সোর্স 2. Almost every object has two nested fields, the object spec and the object status Source 2সোর্স 2. The control plane continually and actively manages every object's actual state to match the desired state you supplied Source 2সোর্স 2. Controllers are control loops that watch the state of your cluster, then make or request changes where needed Source 10সোর্স 10. Each controller tries to move the current cluster state closer to the desired state Source 10সোর্স 10.

A Deployment, its ReplicaSet, and its Pods. A Deployment rolls out a ReplicaSet, and the ReplicaSet creates the Pods in the background Source 5সোর্স 5. A ReplicaSet has a selector that specifies how to identify Pods it can acquire, a number of replicas, and a Pod template Source 4সোর্স 4. It creates and deletes Pods as needed to reach the desired number, and it uses its Pod template when it needs new Pods Source 4সোর্স 4. The name of the ReplicaSet is always formatted as [DEPLOYMENT-NAME]-[HASH], and the hash is the same as the pod-template-hash label on the ReplicaSet Source 5সোর্স 5. This diagram is the tutorial's own picture of step 3 of the practice run below, with the names from the tutorial's run; … stands for nginx-deployment:

Deployment nginx-deployment
└─ ReplicaSet …-54fd4d6d4c
   ├─ Pod …-54fd4d6d4c-9s5hc
   ├─ Pod …-54fd4d6d4c-mgvjk
   └─ Pod …-54fd4d6d4c-vbfn4

Labels and selectors. Via a label selector, a client or user can identify a set of objects Source 6সোর্স 6. The label selector is the core grouping primitive in Kubernetes Source 6সোর্স 6. In a Deployment, the .spec.selector field defines how the created ReplicaSet finds which Pods to manage Source 5সোর্স 5.

A rolling update. A Deployment's rollout is triggered if and only if its Pod template (.spec.template) is changed, for example if the labels or container images of the template are updated Source 5সোর্স 5. Other updates, such as scaling the Deployment, do not trigger a rollout Source 5সোর্স 5. In a rollout, a new ReplicaSet is created, and the Deployment gradually scales it up while scaling down the old ReplicaSet Source 5সোর্স 5. By default, at least 75% of the desired number of Pods are up (25% max unavailable), and at most 125% of the desired number of Pods are up (25% max surge) Source 5সোর্স 5. Each new ReplicaSet updates the revision of the Deployment, and you can roll back to an earlier revision Source 5সোর্স 5.

Pods come and go. Pods are designed as relatively ephemeral, disposable entities Source 3সোর্স 3. If a node fails, a controller notices that the Pods on that node have stopped working and creates a replacement Pod Source 3সোর্স 3. A Pod has a restartPolicy with the possible values Always, OnFailure, and Never; the default value is Always Source 8সোর্স 8. Four of the phases of a Pod:

PhaseMeaning
PendingThe Pod has been accepted by the cluster, but one or more of its containers has not been set up and made ready to run, including the time spent waiting to be scheduled and downloading images Source 8সোর্স 8
RunningThe Pod has been bound to a node, and all of its containers have been created; at least one is still running, or is starting or restarting Source 8সোর্স 8
SucceededAll containers in the Pod have terminated in success, and will not be restarted Source 8সোর্স 8
FailedAll containers in the Pod have terminated, and at least one container has terminated in failure Source 8সোর্স 8

সহজ English

The state that you want. An object in Kubernetes is a "record of intent": once you create it, Kubernetes keeps working to make sure that it exists Source 2সোর্স 2. When you create an object, you tell Kubernetes how you want your cluster's work to look: that is the desired state Source 2সোর্স 2. Almost every object has two parts, the spec and the status Source 2সোর্স 2. The control plane keeps working to make each object's real state match the state that you asked for Source 2সোর্স 2. Controllers are loops that watch the cluster and make or ask for changes where needed Source 10সোর্স 10. Each controller tries to move the cluster closer to the desired state Source 10সোর্স 10.

A Deployment, its ReplicaSet, and its Pods. A Deployment rolls out a ReplicaSet, and the ReplicaSet makes the Pods Source 5সোর্স 5. A ReplicaSet has a selector that says which Pods it can take over, a number of copies, and a Pod template Source 4সোর্স 4. It makes and deletes Pods until the number is right, and it uses the template for each new Pod Source 4সোর্স 4. The ReplicaSet is always named [DEPLOYMENT-NAME]-[HASH], and the hash is the same as its pod-template-hash label Source 5সোর্স 5. This diagram is the tutorial's own picture of step 3 of the practice run below, with the names from the tutorial's run; … stands for nginx-deployment:

Deployment nginx-deployment
└─ ReplicaSet …-54fd4d6d4c
   ├─ Pod …-54fd4d6d4c-9s5hc
   ├─ Pod …-54fd4d6d4c-mgvjk
   └─ Pod …-54fd4d6d4c-vbfn4

Labels and selectors. With a label selector, you can pick out a set of objects Source 6সোর্স 6. The label selector is the main way to group things in Kubernetes Source 6সোর্স 6. In a Deployment, the .spec.selector field tells the ReplicaSet which Pods it manages Source 5সোর্স 5.

A rolling update. A Deployment starts a rollout only when its Pod template (.spec.template) changes, for example when the labels or the container image of the template change Source 5সোর্স 5. Other changes, such as scaling, do not start a rollout Source 5সোর্স 5. In a rollout, a new ReplicaSet is made; the Deployment slowly grows it while it shrinks the old one Source 5সোর্স 5. By default, at least 75% of the wanted Pods stay up (25% max unavailable), and at most 125% are up (25% max surge) Source 5সোর্স 5. Each new ReplicaSet gives the Deployment a new revision, and you can go back to an earlier one Source 5সোর্স 5.

Pods come and go. Pods are built to be short-lived and replaceable Source 3সোর্স 3. If a node fails, a controller notices that its Pods stopped working and makes a replacement Pod Source 3সোর্স 3. A Pod's restartPolicy can be Always, OnFailure, or Never; the default is Always Source 8সোর্স 8. Four of the phases of a Pod:

PhaseMeaning
PendingThe cluster accepted the Pod, but at least one container is not set up and ready yet; this includes waiting for a node and downloading images Source 8সোর্স 8
RunningThe Pod is on a node and all its containers exist; at least one is running, starting, or restarting Source 8সোর্স 8
SucceededAll containers ended with success and will not restart Source 8সোর্স 8
FailedAll containers ended, and at least one ended with a failure Source 8সোর্স 8

বাংলা ব্যাখ্যা

Desired state। Kubernetes object হলো একটা "record of intent": object তৈরি করার পর Kubernetes system সেটা যাতে থাকে, তা নিশ্চিত করতে অবিরাম কাজ করে Source 2সোর্স 2। একটা object তৈরি করে আপনি Kubernetes-কে জানান যে আপনার cluster-এর workload কেমন দেখতে চান: এটাই আপনার cluster-এর desired state Source 2সোর্স 2। প্রায় প্রতিটা object-এ দুটো nested field থাকে, object spec আর object status Source 2সোর্স 2। control plane অবিরাম ও সক্রিয়ভাবে প্রতিটা object-এর actual state-কে আপনার দেওয়া desired state-এর সাথে মেলায় Source 2সোর্স 2। Controller হলো control loop, যা আপনার cluster-এর state দেখে, তারপর দরকার হলে পরিবর্তন করে বা পরিবর্তনের অনুরোধ করে Source 10সোর্স 10। প্রতিটা controller বর্তমান cluster state-কে desired state-এর কাছাকাছি নিতে চেষ্টা করে Source 10সোর্স 10।

একটা Deployment, তার ReplicaSet আর তার Pod। একটা Deployment একটা ReplicaSet rollout করে, আর ReplicaSet পেছনে Pod-গুলো তৈরি করে Source 5সোর্স 5। একটা ReplicaSet-এ থাকে একটা selector, যা বলে কোন Pod সে নিতে পারে, replica-র একটা সংখ্যা, আর একটা Pod template Source 4সোর্স 4। কাঙ্ক্ষিত সংখ্যায় পৌঁছাতে সে দরকারমতো Pod তৈরি ও মুছে ফেলে, আর নতুন Pod দরকার হলে তার Pod template ব্যবহার করে Source 4সোর্স 4। ReplicaSet-এর নাম সবসময় [DEPLOYMENT-NAME]-[HASH] ধাঁচের হয়, আর hash-টা ReplicaSet-এর pod-template-hash label-এর সমান Source 5সোর্স 5। এই diagram নিচের practice run-এর ধাপ ৩-এর টিউটোরিয়ালের নিজের ছবি, নামগুলো টিউটোরিয়ালের run থেকে নেওয়া; … মানে nginx-deployment:

Deployment nginx-deployment
└─ ReplicaSet …-54fd4d6d4c
   ├─ Pod …-54fd4d6d4c-9s5hc
   ├─ Pod …-54fd4d6d4c-mgvjk
   └─ Pod …-54fd4d6d4c-vbfn4

Label আর selector। একটা label selector দিয়ে client বা user কিছু object-এর একটা set চিহ্নিত করতে পারে Source 6সোর্স 6। label selector হলো Kubernetes-এ group করার মূল primitive Source 6সোর্স 6। একটা Deployment-এ .spec.selector field ঠিক করে, তৈরি হওয়া ReplicaSet কোন Pod-গুলো পরিচালনা করবে তা কীভাবে খুঁজে পাবে Source 5সোর্স 5।

Rolling update। একটা Deployment-এর rollout শুরু হয় যদি এবং কেবল যদি তার Pod template (.spec.template) বদলায়, যেমন template-এর label বা container image আপডেট হলে Source 5সোর্স 5। অন্য আপডেট, যেমন Deployment scale করা, rollout শুরু করে না Source 5সোর্স 5। rollout-এ একটা নতুন ReplicaSet তৈরি হয়, আর Deployment ধীরে ধীরে সেটাকে scale up করে, একই সাথে পুরোনো ReplicaSet scale down করে Source 5সোর্স 5। default-ভাবে কাঙ্ক্ষিত Pod সংখ্যার অন্তত 75% চালু থাকে (25% max unavailable), আর সর্বোচ্চ 125% চালু থাকে (25% max surge) Source 5সোর্স 5। প্রতিটা নতুন ReplicaSet Deployment-এর revision আপডেট করে, আর আপনি আগের একটা revision-এ rollback করতে পারেন Source 5সোর্স 5।

Pod আসে আর যায়। Pod-গুলো তুলনামূলকভাবে ক্ষণস্থায়ী, ফেলে দেওয়ার মতো entity হিসেবে বানানো Source 3সোর্স 3। একটা node ফেল করলে একটা controller খেয়াল করে যে সেই node-এর Pod-গুলো কাজ করা বন্ধ করেছে, আর একটা replacement Pod তৈরি করে Source 3সোর্স 3। Pod-এর একটা restartPolicy থাকে, যার সম্ভাব্য মান Always, OnFailure আর Never; default মান Always Source 8সোর্স 8। Pod-এর চারটা phase:

Phaseঅর্থ
Pendingcluster Pod-টা গ্রহণ করেছে, কিন্তু এক বা একাধিক container এখনো set up হয়ে চলার জন্য প্রস্তুত হয়নি; schedule হওয়ার অপেক্ষা আর image download-এর সময়ও এর মধ্যে Source 8সোর্স 8
RunningPod একটা node-এ bind হয়েছে, আর সব container তৈরি হয়েছে; অন্তত একটা এখনো চলছে, বা শুরু বা restart হচ্ছে Source 8সোর্স 8
SucceededPod-এর সব container সফলভাবে শেষ হয়েছে, আর restart হবে না Source 8সোর্স 8
FailedPod-এর সব container শেষ হয়েছে, আর অন্তত একটা container ব্যর্থ হয়ে শেষ হয়েছে Source 8সোর্স 8

Try it

The tutorial ran these steps on 2026-11-18 on Linux, with Docker 29.10.0, kind v0.33.0, and kubectl v1.37.2; the cluster ran Kubernetes v1.37.0. The Deployment is the example of the Kubernetes documentation. Pod names, hashes, and ages differ on your machine.

1. Install the tools. kind does not require kubectl, but you will not be able to perform some of the examples in kind's docs without it Source 16সোর্স 16. Use a kubectl version that is within one minor version of your cluster: a v1.37 client can communicate with v1.36, v1.37, and v1.38 control planes Source 12সোর্স 12. Follow the install pages of kubectl and kind; the tutorial used the release binaries of both, and checked them against their SHA-256 checksums.

2. Create a cluster. kind create cluster bootstraps a Kubernetes cluster using a pre-built node image Source 16সোর্স 16. By default the cluster is named kind; the --name flag gives it another name Source 16সোর্স 16. For configuration, kubectl looks for a file named config in the $HOME/.kube directory Source 11সোর্স 11, and by default kind stores the cluster access configuration in ${HOME}/.kube/config if the $KUBECONFIG environment variable is not set Source 16সোর্স 16. kubectl commands have the form kubectl [command] [TYPE] [NAME] [flags]: the command is an operation such as create, get, describe, or delete, and the type can be given in the singular, plural, or abbreviated form Source 11সোর্স 11. If the name is omitted, details for all resources of the type are displayed Source 11সোর্স 11. The block below creates the cluster and talks to it through its context, as the kind docs do with kubectl cluster-info --context kind-kind Source 16সোর্স 16, then gets all nodes and all namespaces Source 11সোর্স 11:

kind create cluster --name qa-lab
kubectl cluster-info --context kind-qa-lab
kubectl get nodes
kubectl get namespaces

In the tutorial's run, kind printed Set kubectl context to "kind-qa-lab". There was no ~/.kube folder before the run; afterwards, there was a ~/.kube/config file. The one node, qa-lab-control-plane, was Ready with version v1.37.0. Kubernetes starts with four namespaces: default, kube-node-lease, kube-public, and kube-system Source 7সোর্স 7. The run listed those four and a fifth, local-path-storage.

3. Create a Deployment. The example Deployment of the Kubernetes docs creates a ReplicaSet to bring up three nginx Pods Source 5সোর্স 5:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80

The docs create it, check the rollout, and list the Deployment, its ReplicaSet, and the labels of its Pods Source 5সোর্স 5:

kubectl apply -f https://k8s.io/examples/controllers/nginx-deployment.yaml
kubectl rollout status deployment/nginx-deployment
kubectl get deployments
kubectl get rs
kubectl get pods --show-labels

READY shows how many replicas of the application are available to your users, as ready/desired Source 5সোর্স 5. In the tutorial's run, kubectl get deployments printed this after the rollout:

NAME               READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deployment   3/3     3            3           35s

Each Pod had the labels app=nginx and pod-template-hash=54fd4d6d4c.

4. Delete one Pod. A ReplicaSet creates and deletes Pods as needed to reach the desired number Source 4সোর্স 4. kubectl delete with a resource type and a name performs the delete operation on that resource Source 11সোর্স 11, and -l selects the Pods by label Source 6সোর্স 6:

kubectl delete pod nginx-deployment-54fd4d6d4c-9s5hc
kubectl get pods -l app=nginx

Use a Pod name from your own list. In the tutorial's run, a new Pod, nginx-deployment-54fd4d6d4c-69bwz, was Running 3 seconds later, and there were three Pods again.

5. Roll out a new image. kubectl set image changes the image of the Pod template, so it starts a rollout Source 5সোর্স 5. -o wide lists with more details Source 14সোর্স 14:

kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1
kubectl rollout status deployment/nginx-deployment
kubectl get rs
kubectl get deployment nginx-deployment -o wide

In the tutorial's run, the new ReplicaSet had all three Pods, and the old one had none:

NAME                          DESIRED   CURRENT   READY   AGE
nginx-deployment-54fd4d6d4c   0         0         0       77s
nginx-deployment-76df5b8bb8   3         3         3       39s

The IMAGES column of -o wide showed nginx:1.16.1.

6. Break the rollout on purpose. This is the docs' own example: a typo in the image, nginx:1.161 instead of nginx:1.16.1, and the rollout gets stuck Source 5সোর্স 5. By default, rollout status watches the latest rollout until it is done; --timeout sets the length of time to wait before ending the watch Source 13সোর্স 13. kubectl describe describes a resource with verbose output Source 14সোর্স 14:

kubectl set image deployment/nginx-deployment nginx=nginx:1.161
kubectl rollout status deployment/nginx-deployment --timeout=60s
kubectl get pods -l app=nginx
kubectl describe pod <name-of-the-pod-that-does-not-start>

In the tutorial's run, rollout status printed these two lines and exited with code 1:

Waiting for deployment "nginx-deployment" rollout to finish: 1 out of 3 new replicas have been updated...
error: timed out waiting for the condition

The three Pods of the old ReplicaSet kept running. The new Pod showed ErrImagePull. Its Events said Failed to pull image "nginx:1.161", and the message ended in docker.io/library/nginx:1.161: not found. The last two lines of its Events were:

Normal   BackOff    1s (x3 over 58s)   kubelet            spec.containers{nginx}: Back-off pulling image "nginx:1.161"
Warning  Failed     1s (x3 over 58s)   kubelet            spec.containers{nginx}: Error: ImagePullBackOff

ImagePullBackOff means that a container could not start because Kubernetes could not pull a container image, for reasons such as an invalid image name Source 9সোর্স 9. Kubernetes keeps trying with an increasing back-off delay, up to a compiled-in limit of 300 seconds Source 9সোর্স 9. The Deployment controller stops the bad rollout automatically, and stops scaling up the new ReplicaSet Source 5সোর্স 5.

7. Roll back. kubectl rollout history lists the revisions, and kubectl rollout undo rolls back to the previous one Source 5সোর্স 5:

kubectl rollout history deployment/nginx-deployment
kubectl rollout undo deployment/nginx-deployment
kubectl rollout status deployment/nginx-deployment
kubectl get deployment nginx-deployment -o wide

In the tutorial's run, undo printed:

Warning: resource deployments/nginx-deployment was previously managed with 'kubectl apply'. Rolling back will not update the kubectl.kubernetes.io/last-applied-configuration annotation, which may cause unexpected behavior on future 'kubectl apply' operations. Consider using 'kubectl apply' with your previous configuration file instead.
deployment.apps/nginx-deployment rolled back

The image was nginx:1.16.1 again. The history listed the revisions 1, 3, and 4: revision 2 was no longer in the list.

8. Scale, then clean up. kubectl scale changes the number of replicas Source 5সোর্স 5. Scaling does not trigger a rollout Source 5সোর্স 5. kubectl delete with a resource type and a name performs the delete operation on that resource Source 11সোর্স 11:

kubectl scale deployment/nginx-deployment --replicas=5
kubectl get deployment nginx-deployment
kubectl delete deployment nginx-deployment
kubectl get pods -l app=nginx

In the tutorial's run, the Deployment showed 5/5, and after the delete, kubectl get pods printed No resources found in default namespace.

Keep the cluster. The next Kubernetes pages use the same cluster. When you are done with them, kind delete cluster --name qa-lab deletes it; without --name, kind deletes the cluster named kind Source 16সোর্স 16.

সহজ English

The tutorial ran these steps on 2026-11-18 on Linux, with Docker 29.10.0, kind v0.33.0, and kubectl v1.37.2; the cluster ran Kubernetes v1.37.0. The Deployment is the example of the Kubernetes documentation. Pod names, hashes, and ages differ on your machine.

1. Install the tools. kind works without kubectl, but some examples in kind's docs need it Source 16সোর্স 16. Use a kubectl that is at most one minor version away from your cluster: a v1.37 kubectl works with v1.36, v1.37, and v1.38 control planes Source 12সোর্স 12. Follow the install pages of kubectl and kind; the tutorial used the release binaries of both, and checked them against their SHA-256 checksums.

2. Create a cluster. kind create cluster starts a Kubernetes cluster from a ready-made node image Source 16সোর্স 16. Without --name, the cluster is called kind Source 16সোর্স 16. kubectl reads its settings from a file named config in the $HOME/.kube folder Source 11সোর্স 11, and kind saves the access settings of the cluster in ${HOME}/.kube/config by default, unless $KUBECONFIG is set Source 16সোর্স 16. kubectl commands look like kubectl [command] [TYPE] [NAME] [flags]: the command is an action such as create, get, describe, or delete, and the type can be singular, plural, or short Source 11সোর্স 11. Without a name, kubectl shows details for all resources of that type Source 11সোর্স 11. The block below makes the cluster and talks to it through its context, as the kind docs do with kubectl cluster-info --context kind-kind Source 16সোর্স 16, then gets all nodes and all namespaces Source 11সোর্স 11:

kind create cluster --name qa-lab
kubectl cluster-info --context kind-qa-lab
kubectl get nodes
kubectl get namespaces

In the tutorial's run, kind printed Set kubectl context to "kind-qa-lab". There was no ~/.kube folder before the run; afterwards, there was a ~/.kube/config file. The one node, qa-lab-control-plane, was Ready with version v1.37.0. Kubernetes starts with four namespaces: default, kube-node-lease, kube-public, and kube-system Source 7সোর্স 7. The run listed those four and a fifth, local-path-storage.

3. Create a Deployment. The example Deployment of the Kubernetes docs makes a ReplicaSet that starts three nginx Pods Source 5সোর্স 5:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80

The docs create it, check the rollout, and list the Deployment, its ReplicaSet, and the labels of its Pods Source 5সোর্স 5:

kubectl apply -f https://k8s.io/examples/controllers/nginx-deployment.yaml
kubectl rollout status deployment/nginx-deployment
kubectl get deployments
kubectl get rs
kubectl get pods --show-labels

READY shows how many copies of the app your users can reach, as ready/wanted Source 5সোর্স 5. In the tutorial's run, kubectl get deployments printed this after the rollout:

NAME               READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deployment   3/3     3            3           35s

Each Pod had the labels app=nginx and pod-template-hash=54fd4d6d4c.

4. Delete one Pod. A ReplicaSet makes and deletes Pods until the number is right Source 4সোর্স 4. kubectl delete with a type and a name deletes that resource Source 11সোর্স 11, and -l picks the Pods by their label Source 6সোর্স 6:

kubectl delete pod nginx-deployment-54fd4d6d4c-9s5hc
kubectl get pods -l app=nginx

Use a Pod name from your own list. In the tutorial's run, a new Pod, nginx-deployment-54fd4d6d4c-69bwz, was Running 3 seconds later, and there were three Pods again.

5. Roll out a new image. kubectl set image changes the image in the Pod template, so a rollout starts Source 5সোর্স 5. -o wide shows more details Source 14সোর্স 14:

kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1
kubectl rollout status deployment/nginx-deployment
kubectl get rs
kubectl get deployment nginx-deployment -o wide

In the tutorial's run, the new ReplicaSet had all three Pods, and the old one had none:

NAME                          DESIRED   CURRENT   READY   AGE
nginx-deployment-54fd4d6d4c   0         0         0       77s
nginx-deployment-76df5b8bb8   3         3         3       39s

The IMAGES column of -o wide showed nginx:1.16.1.

6. Break the rollout on purpose. This is the docs' own example: a typo in the image, nginx:1.161 instead of nginx:1.16.1, and the rollout gets stuck Source 5সোর্স 5. By default, rollout status watches the latest rollout until it is done; --timeout sets how long it waits before it stops watching Source 13সোর্স 13. kubectl describe describes a resource with verbose output Source 14সোর্স 14:

kubectl set image deployment/nginx-deployment nginx=nginx:1.161
kubectl rollout status deployment/nginx-deployment --timeout=60s
kubectl get pods -l app=nginx
kubectl describe pod <name-of-the-pod-that-does-not-start>

In the tutorial's run, rollout status printed these two lines and exited with code 1:

Waiting for deployment "nginx-deployment" rollout to finish: 1 out of 3 new replicas have been updated...
error: timed out waiting for the condition

The three Pods of the old ReplicaSet kept running. The new Pod showed ErrImagePull. Its Events said Failed to pull image "nginx:1.161", and the message ended in docker.io/library/nginx:1.161: not found. The last two lines of its Events were:

Normal   BackOff    1s (x3 over 58s)   kubelet            spec.containers{nginx}: Back-off pulling image "nginx:1.161"
Warning  Failed     1s (x3 over 58s)   kubelet            spec.containers{nginx}: Error: ImagePullBackOff

ImagePullBackOff means that a container could not start because Kubernetes could not pull its image, for example because the image name is wrong Source 9সোর্স 9. Kubernetes keeps trying, and waits longer each time, up to a built-in limit of 300 seconds Source 9সোর্স 9. The Deployment controller stops the bad rollout by itself, and stops growing the new ReplicaSet Source 5সোর্স 5.

7. Roll back. kubectl rollout history lists the revisions, and kubectl rollout undo goes back to the previous one Source 5সোর্স 5:

kubectl rollout history deployment/nginx-deployment
kubectl rollout undo deployment/nginx-deployment
kubectl rollout status deployment/nginx-deployment
kubectl get deployment nginx-deployment -o wide

In the tutorial's run, undo printed:

Warning: resource deployments/nginx-deployment was previously managed with 'kubectl apply'. Rolling back will not update the kubectl.kubernetes.io/last-applied-configuration annotation, which may cause unexpected behavior on future 'kubectl apply' operations. Consider using 'kubectl apply' with your previous configuration file instead.
deployment.apps/nginx-deployment rolled back

The image was nginx:1.16.1 again. The history listed the revisions 1, 3, and 4: revision 2 was no longer in the list.

8. Scale, then clean up. kubectl scale changes the number of copies Source 5সোর্স 5. Scaling does not start a rollout Source 5সোর্স 5. kubectl delete with a type and a name deletes that resource Source 11সোর্স 11:

kubectl scale deployment/nginx-deployment --replicas=5
kubectl get deployment nginx-deployment
kubectl delete deployment nginx-deployment
kubectl get pods -l app=nginx

In the tutorial's run, the Deployment showed 5/5, and after the delete, kubectl get pods printed No resources found in default namespace.

Keep the cluster. The next Kubernetes pages use the same cluster. When you are done with them, kind delete cluster --name qa-lab deletes it; without --name, kind deletes the cluster named kind Source 16সোর্স 16.

বাংলা ব্যাখ্যা

টিউটোরিয়াল এই ধাপগুলো 2026-11-18 তারিখে Linux-এ Docker 29.10.0, kind v0.33.0 আর kubectl v1.37.2 দিয়ে চালিয়েছে; cluster-এ চলেছে Kubernetes v1.37.0। Deployment-টা Kubernetes documentation-এর উদাহরণ। Pod-এর নাম, hash আর age আপনার machine-এ আলাদা হবে।

১. টুলগুলো install করুন। kind-এর kubectl লাগে না, তবে kubectl ছাড়া kind-এর docs-এর কিছু উদাহরণ চালাতে পারবেন না Source 16সোর্স 16। আপনার cluster থেকে এক minor version-এর মধ্যে থাকা kubectl ব্যবহার করুন: v1.37 client v1.36, v1.37 আর v1.38 control plane-এর সাথে যোগাযোগ করতে পারে Source 12সোর্স 12। kubectl আর kind-এর install page অনুসরণ করুন; টিউটোরিয়াল দুটোরই release binary ব্যবহার করেছে, আর তাদের SHA-256 checksum মিলিয়ে দেখেছে।

২. একটা cluster তৈরি করুন। kind create cluster একটা pre-built node image দিয়ে একটা Kubernetes cluster চালু করে Source 16সোর্স 16। default-ভাবে cluster-এর নাম kind; --name flag অন্য নাম দেয় Source 16সোর্স 16। configuration-এর জন্য kubectl $HOME/.kube directory-তে config নামের একটা file খোঁজে Source 11সোর্স 11, আর $KUBECONFIG environment variable set না থাকলে kind default-ভাবে cluster access configuration ${HOME}/.kube/config-এ রাখে Source 16সোর্স 16। kubectl command-এর গঠন kubectl [command] [TYPE] [NAME] [flags]: command হলো create, get, describe বা delete-এর মতো একটা operation, আর TYPE singular, plural বা abbreviated রূপে দেওয়া যায় Source 11সোর্স 11। নাম না দিলে ওই type-এর সব resource-এর details দেখানো হয় Source 11সোর্স 11। নিচের block cluster তৈরি করে আর তার context দিয়ে তার সাথে কথা বলে, যেমন kind docs kubectl cluster-info --context kind-kind দিয়ে করে Source 16সোর্স 16, তারপর সব node আর সব namespace দেখায় Source 11সোর্স 11:

kind create cluster --name qa-lab
kubectl cluster-info --context kind-qa-lab
kubectl get nodes
kubectl get namespaces

টিউটোরিয়ালের run-এ kind print করেছে Set kubectl context to "kind-qa-lab"। run-এর আগে কোনো ~/.kube folder ছিল না; পরে একটা ~/.kube/config file ছিল। একমাত্র node qa-lab-control-plane ছিল Ready, version v1.37.0। Kubernetes চারটা namespace দিয়ে শুরু হয়: default, kube-node-lease, kube-public আর kube-system Source 7সোর্স 7। run-এ এই চারটা আর পঞ্চম একটা, local-path-storage, দেখা গেছে।

৩. একটা Deployment তৈরি করুন। Kubernetes docs-এর উদাহরণ Deployment তিনটা nginx Pod চালু করতে একটা ReplicaSet তৈরি করে Source 5সোর্স 5:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80

docs এটা তৈরি করে, rollout দেখে, আর Deployment, তার ReplicaSet আর তার Pod-গুলোর label-এর তালিকা দেখায় Source 5সোর্স 5:

kubectl apply -f https://k8s.io/examples/controllers/nginx-deployment.yaml
kubectl rollout status deployment/nginx-deployment
kubectl get deployments
kubectl get rs
kubectl get pods --show-labels

READY দেখায় application-এর কতগুলো replica আপনার user-দের জন্য available, ready/desired আকারে Source 5সোর্স 5। টিউটোরিয়ালের run-এ rollout-এর পর kubectl get deployments এটা print করেছে:

NAME               READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deployment   3/3     3            3           35s

প্রতিটা Pod-এর label ছিল app=nginx আর pod-template-hash=54fd4d6d4c।

৪. একটা Pod মুছে ফেলুন। কাঙ্ক্ষিত সংখ্যায় পৌঁছাতে ReplicaSet দরকারমতো Pod তৈরি ও মুছে ফেলে Source 4সোর্স 4। resource type আর নাম দিয়ে kubectl delete ওই resource-এর ওপর delete operation চালায় Source 11সোর্স 11, আর -l label দিয়ে Pod বাছাই করে Source 6সোর্স 6:

kubectl delete pod nginx-deployment-54fd4d6d4c-9s5hc
kubectl get pods -l app=nginx

আপনার নিজের তালিকা থেকে একটা Pod-এর নাম নিন। টিউটোরিয়ালের run-এ ৩ সেকেন্ড পরে একটা নতুন Pod, nginx-deployment-54fd4d6d4c-69bwz, Running ছিল, আর আবার তিনটা Pod হয়ে গিয়েছিল।

৫. নতুন image rollout করুন। kubectl set image Pod template-এর image বদলায়, তাই একটা rollout শুরু হয় Source 5সোর্স 5। -o wide আরও বিস্তারিত দেখায় Source 14সোর্স 14:

kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1
kubectl rollout status deployment/nginx-deployment
kubectl get rs
kubectl get deployment nginx-deployment -o wide

টিউটোরিয়ালের run-এ নতুন ReplicaSet-এ তিনটা Pod-ই ছিল, আর পুরোনোটায় একটাও না:

NAME                          DESIRED   CURRENT   READY   AGE
nginx-deployment-54fd4d6d4c   0         0         0       77s
nginx-deployment-76df5b8bb8   3         3         3       39s

-o wide-এর IMAGES column দেখিয়েছে nginx:1.16.1।

৬. ইচ্ছা করে rollout ভেঙে দিন। এটা docs-এর নিজের উদাহরণ: image-এ বানান ভুল, nginx:1.16.1-এর বদলে nginx:1.161, আর rollout আটকে যায় Source 5সোর্স 5। default-ভাবে rollout status সর্বশেষ rollout শেষ না হওয়া পর্যন্ত দেখতে থাকে; --timeout ঠিক করে দেখা বন্ধ করার আগে কতক্ষণ অপেক্ষা করবে Source 13সোর্স 13। kubectl describe verbose output দিয়ে একটা resource-এর বর্ণনা দেয় Source 14সোর্স 14:

kubectl set image deployment/nginx-deployment nginx=nginx:1.161
kubectl rollout status deployment/nginx-deployment --timeout=60s
kubectl get pods -l app=nginx
kubectl describe pod <name-of-the-pod-that-does-not-start>

টিউটোরিয়ালের run-এ rollout status এই দুটো লাইন print করেছে, আর exit code 1 দিয়ে শেষ হয়েছে:

Waiting for deployment "nginx-deployment" rollout to finish: 1 out of 3 new replicas have been updated...
error: timed out waiting for the condition

পুরোনো ReplicaSet-এর তিনটা Pod চলতে থেকেছে। নতুন Pod দেখিয়েছে ErrImagePull। তার Events বলেছে Failed to pull image "nginx:1.161", আর message-টা শেষ হয়েছে docker.io/library/nginx:1.161: not found দিয়ে। তার Events-এর শেষ দুটো লাইন ছিল:

Normal   BackOff    1s (x3 over 58s)   kubelet            spec.containers{nginx}: Back-off pulling image "nginx:1.161"
Warning  Failed     1s (x3 over 58s)   kubelet            spec.containers{nginx}: Error: ImagePullBackOff

ImagePullBackOff মানে Kubernetes একটা container image pull করতে পারেনি বলে container চালু হতে পারেনি, যেমন image-এর নাম ভুল হলে Source 9সোর্স 9। Kubernetes ক্রমবর্ধমান back-off delay দিয়ে চেষ্টা চালিয়ে যায়, compiled-in একটা সীমা, 300 সেকেন্ড পর্যন্ত Source 9সোর্স 9। Deployment controller খারাপ rollout নিজে থেকে থামিয়ে দেয়, আর নতুন ReplicaSet scale up করা বন্ধ করে Source 5সোর্স 5।

৭. Rollback করুন। kubectl rollout history revision-গুলোর তালিকা দেয়, আর kubectl rollout undo আগের revision-এ ফিরে যায় Source 5সোর্স 5:

kubectl rollout history deployment/nginx-deployment
kubectl rollout undo deployment/nginx-deployment
kubectl rollout status deployment/nginx-deployment
kubectl get deployment nginx-deployment -o wide

টিউটোরিয়ালের run-এ undo print করেছে:

Warning: resource deployments/nginx-deployment was previously managed with 'kubectl apply'. Rolling back will not update the kubectl.kubernetes.io/last-applied-configuration annotation, which may cause unexpected behavior on future 'kubectl apply' operations. Consider using 'kubectl apply' with your previous configuration file instead.
deployment.apps/nginx-deployment rolled back

image আবার nginx:1.16.1 হয়েছে। history-তে revision 1, 3 আর 4 দেখা গেছে: revision 2 আর তালিকায় ছিল না।

৮. Scale করুন, তারপর পরিষ্কার করুন। kubectl scale replica-র সংখ্যা বদলায় Source 5সোর্স 5। scale করলে rollout শুরু হয় না Source 5সোর্স 5। resource type আর নাম দিয়ে kubectl delete ওই resource-এর ওপর delete operation চালায় Source 11সোর্স 11:

kubectl scale deployment/nginx-deployment --replicas=5
kubectl get deployment nginx-deployment
kubectl delete deployment nginx-deployment
kubectl get pods -l app=nginx

টিউটোরিয়ালের run-এ Deployment দেখিয়েছে 5/5, আর delete-এর পর kubectl get pods print করেছে No resources found in default namespace.

cluster-টা রেখে দিন। পরের Kubernetes page-গুলো একই cluster ব্যবহার করে। ওগুলো শেষ হলে kind delete cluster --name qa-lab cluster-টা মুছে দেয়; --name না দিলে kind kind নামের cluster-টা মুছে দেয় Source 16সোর্স 16।

How a tester uses it

Gate the tests on the rollout. If the rollout completed successfully, kubectl rollout status returns a zero exit code Source 5সোর্স 5. It returns a non-zero exit code if the Deployment has exceeded the progression deadline Source 5সোর্স 5. The deadline is .spec.progressDeadlineSeconds, and it defaults to 600 Source 5সোর্স 5. With --timeout, the watch ends after the time that you give Source 13সোর্স 13; in step 6, it ended a stuck rollout with exit code 1.

Know which version you test. You should avoid the :latest tag when deploying containers in production, as it is harder to track which version of the image is running and more difficult to roll back properly Source 9সোর্স 9. Instead, specify a meaningful tag such as v1.42.0 and/or a digest Source 9সোর্স 9. kubectl rollout history lists the revisions of a Deployment Source 5সোর্স 5, and -o wide lists with more details Source 14সোর্স 14. In step 5 of the tutorial's run, the IMAGES column of -o wide showed the image.

Test your own build in a throwaway cluster. kind may be used for local development or CI Source 15সোর্স 15. You can load one or more images into your kind cluster; for a named cluster such as qa-lab, you need to specify the name of the cluster with --name Source 16সোর্স 16. The kind docs show this workflow Source 16সোর্স 16:

docker build -t my-custom-image:unique-tag ./my-image-dir
kind load docker-image my-custom-image:unique-tag
kubectl apply -f my-manifest-using-my-image.yaml

With --wait, kind create cluster blocks until the control plane reaches a ready status; to wait for 30 seconds, use --wait 30s Source 16সোর্স 16.

One cluster, many test environments. Names of resources need to be unique within a namespace, but not across namespaces Source 7সোর্স 7.

Check the self-healing. A ReplicaSet creates and deletes Pods as needed to reach the desired number Source 4সোর্স 4. Step 4 shows a test of it: delete a Pod, then count the Pods again.

Read the Events first. kubectl get events --sort-by=.metadata.creationTimestamp lists Events sorted by timestamp, and kubectl events --types=Warning lists all warning events Source 14সোর্স 14. In step 6, the Events of the Pod named the image that could not be pulled.

সহজ English

Wait for the rollout before the tests. When a rollout finishes well, kubectl rollout status ends with exit code 0 Source 5সোর্স 5. It ends with another code when the Deployment goes past its progress deadline Source 5সোর্স 5. That deadline is .spec.progressDeadlineSeconds, 600 by default Source 5সোর্স 5. With --timeout, the command stops watching after the time that you give Source 13সোর্স 13; in step 6, it stopped a stuck rollout with exit code 1.

Know which version you test. Avoid the :latest tag in production: with it, it is harder to see which version of the image runs, and harder to roll back Source 9সোর্স 9. Use a clear tag such as v1.42.0, a digest, or both Source 9সোর্স 9. kubectl rollout history lists a Deployment's revisions Source 5সোর্স 5, and -o wide shows more details Source 14সোর্স 14. In step 5 of the tutorial's run, the IMAGES column of -o wide showed the image.

Test your own build in a cluster that you throw away. You can use kind on your own computer or in CI Source 15সোর্স 15. You can load one or more images into your kind cluster; for a cluster with a name, such as qa-lab, give that name with --name Source 16সোর্স 16. The kind docs show this workflow Source 16সোর্স 16:

docker build -t my-custom-image:unique-tag ./my-image-dir
kind load docker-image my-custom-image:unique-tag
kubectl apply -f my-manifest-using-my-image.yaml

With --wait, kind create cluster waits until the control plane is ready; for 30 seconds, use --wait 30s Source 16সোর্স 16.

One cluster, many test environments. A name must be unique inside its namespace, but the same name can be used in another namespace Source 7সোর্স 7.

Check the self-healing. A ReplicaSet makes and deletes Pods until the number is right Source 4সোর্স 4. Step 4 shows a test of it: delete a Pod, then count the Pods again.

Read the Events first. kubectl get events --sort-by=.metadata.creationTimestamp lists the Events by time, and kubectl events --types=Warning lists all the warnings Source 14সোর্স 14. In step 6, the Pod's Events named the image that could not be pulled.

বাংলা ব্যাখ্যা

rollout-এর ওপর test আটকে রাখুন। rollout সফলভাবে শেষ হলে kubectl rollout status zero exit code ফেরত দেয় Source 5সোর্স 5। Deployment progression deadline পেরিয়ে গেলে এটা non-zero exit code ফেরত দেয় Source 5সোর্স 5। deadline-টা হলো .spec.progressDeadlineSeconds, আর এর default 600 Source 5সোর্স 5। --timeout দিলে আপনার দেওয়া সময় পরে watch শেষ হয় Source 13সোর্স 13; ধাপ ৬-এ এটা একটা আটকে যাওয়া rollout exit code 1 দিয়ে শেষ করেছে।

কোন version test করছেন, জানুন। production-এ container deploy করার সময় :latest tag এড়িয়ে চলা উচিত, কারণ তাতে image-এর কোন version চলছে তা track করা কঠিন, আর ঠিকমতো rollback করাও কঠিন Source 9সোর্স 9। এর বদলে v1.42.0-এর মতো অর্থবহ একটা tag আর/বা একটা digest দিন Source 9সোর্স 9। kubectl rollout history একটা Deployment-এর revision-গুলোর তালিকা দেয় Source 5সোর্স 5, আর -o wide আরও বিস্তারিত দেখায় Source 14সোর্স 14। টিউটোরিয়ালের run-এর ধাপ ৫-এ -o wide-এর IMAGES column image দেখিয়েছে।

নিজের build ফেলে দেওয়ার মতো একটা cluster-এ test করুন। kind local development বা CI-তে ব্যবহার করা যায় Source 15সোর্স 15। আপনার kind cluster-এ এক বা একাধিক image load করা যায়; qa-lab-এর মতো নাম দেওয়া cluster-এর ক্ষেত্রে --name দিয়ে cluster-এর নাম বলে দিতে হয় Source 16সোর্স 16। kind docs এই workflow দেখায় Source 16সোর্স 16:

docker build -t my-custom-image:unique-tag ./my-image-dir
kind load docker-image my-custom-image:unique-tag
kubectl apply -f my-manifest-using-my-image.yaml

--wait দিলে control plane ready status-এ না পৌঁছানো পর্যন্ত kind create cluster অপেক্ষা করে; ৩০ সেকেন্ড অপেক্ষার জন্য --wait 30s Source 16সোর্স 16।

এক cluster, অনেক test environment। resource-এর নাম একটা namespace-এর ভেতরে unique হতে হয়, কিন্তু namespace-গুলোর মধ্যে নয় Source 7সোর্স 7।

Self-healing যাচাই করুন। কাঙ্ক্ষিত সংখ্যায় পৌঁছাতে ReplicaSet দরকারমতো Pod তৈরি ও মুছে ফেলে Source 4সোর্স 4। ধাপ ৪ এর একটা test দেখায়: একটা Pod মুছে আবার Pod গুনুন।

আগে Events পড়ুন। kubectl get events --sort-by=.metadata.creationTimestamp timestamp অনুযায়ী সাজানো Events-এর তালিকা দেয়, আর kubectl events --types=Warning সব warning event-এর তালিকা দেয় Source 14সোর্স 14। ধাপ ৬-এ Pod-এর Events সেই image-এর নাম বলেছে, যা pull করা যায়নি।

Common mistakes

সহজ English

বাংলা ব্যাখ্যা

  • হাতে Pod তৈরি করা। সাধারণত সরাসরি Pod তৈরি করার দরকার হয় না, এমনকি একটা Pod-ও না; এর বদলে Deployment বা Job-এর মতো workload resource দিয়ে তৈরি করুন Source 3সোর্স 3। Pod-গুলো তুলনামূলকভাবে ক্ষণস্থায়ী, ফেলে দেওয়ার মতো entity হিসেবে বানানো Source 3সোর্স 3।
  • Deployment-এর ReplicaSet বদলানো। কোনো Deployment-এর মালিকানাধীন ReplicaSet নিজে পরিচালনা করবেন না Source 5সোর্স 5।
  • :latest test করা। এতে image-এর কোন version চলছে তা track করা কঠিন Source 9সোর্স 9। Kubernetes-এর default pull policy IfNotPresent, যদি না image tag :latest হয় বা tag না থাকে; সেক্ষেত্রে default policy Always Source 16সোর্স 16। kind-এ load করা image যাতে ঠিকমতো কাজ করে, তার জন্য :latest tag ব্যবহার করবেন না, আর/অথবা আপনার container-এ imagePullPolicy: IfNotPresent বা imagePullPolicy: Never দিন Source 16সোর্স 16।
  • Deployment-এর selector বদলানো। apps/v1-এ Deployment তৈরির পর .spec.selector আর বদলানো যায় না Source 5সোর্স 5।
  • সীমাহীন অপেক্ষা। default-ভাবে rollout status সর্বশেষ rollout শেষ না হওয়া পর্যন্ত দেখতে থাকে Source 13সোর্স 13। docs-এর উদাহরণে image-এ বানান ভুল থাকায় rollout আটকে যায় Source 5সোর্স 5। --timeout যোগ করুন Source 13সোর্স 13।
  • cluster-এর version থেকে দূরের kubectl। আপনার cluster থেকে এক minor version-এর মধ্যে থাকা kubectl ব্যবহার করুন Source 12সোর্স 12।

What a tester can check

Tutorial advice

This list is the tutorial's own advice for a tester whose app runs on Kubernetes.

  • Ask which image tag each test environment runs, and check it with kubectl get deployment -o wide.
  • Run kubectl rollout status with --timeout before the tests start, and stop the test job when it fails.
  • Ask how long the pipeline waits for a stuck rollout, and who is told when it fails.
  • Give each test run its own namespace or its own kind cluster, and delete it afterwards.
  • When a Pod does not start, read its Events with kubectl describe pod before you read its logs.
  • Delete one Pod during a test, and check that the Deployment brings the count back.
  • Keep kubectl within one minor version of the cluster on the machines that run the tests.

সহজ English

Tutorial advice

This list is the tutorial's own advice for a tester whose app runs on Kubernetes.

  • Ask which image tag each test environment runs, and check it with kubectl get deployment -o wide.
  • Run kubectl rollout status with --timeout before the tests start, and stop the test job when it fails.
  • Ask how long the pipeline waits for a stuck rollout, and who is told when it fails.
  • Give each test run its own namespace or its own kind cluster, and delete it afterwards.
  • When a Pod does not start, read its Events with kubectl describe pod before you read its logs.
  • Delete one Pod during a test, and check that the Deployment brings the count back.
  • Keep kubectl within one minor version of the cluster on the machines that run the tests.

বাংলা ব্যাখ্যা

Tutorial advice

এই তালিকা টিউটোরিয়ালের নিজের পরামর্শ, এমন একজন tester-এর জন্য যার app Kubernetes-এ চলে।

  • জিজ্ঞেস করুন কোন test environment-এ কোন image tag চলছে, আর kubectl get deployment -o wide দিয়ে যাচাই করুন।
  • test শুরুর আগে --timeout-সহ kubectl rollout status চালান, আর এটা ফেল করলে test job থামিয়ে দিন।
  • জিজ্ঞেস করুন pipeline একটা আটকে যাওয়া rollout-এর জন্য কতক্ষণ অপেক্ষা করে, আর ফেল করলে কাকে জানানো হয়।
  • প্রতিটা test run-কে তার নিজের namespace বা নিজের kind cluster দিন, আর পরে মুছে ফেলুন।
  • একটা Pod চালু না হলে তার log পড়ার আগে kubectl describe pod দিয়ে তার Events পড়ুন।
  • test চলার সময় একটা Pod মুছে দিন, আর দেখুন Deployment সংখ্যাটা আবার ফিরিয়ে আনে কি না।
  • যে machine-গুলো test চালায়, সেখানে kubectl-কে cluster থেকে এক minor version-এর মধ্যে রাখুন।

Key words

TermMeaning
KubernetesA portable, extensible, open source platform for managing containerized workloads and services
PodThe smallest deployable unit of computing in Kubernetes: one or more containers with shared storage and network resources
ReplicaSetMaintains a stable set of replica Pods running at any given time
DeploymentProvides declarative updates for Pods and ReplicaSets; it rolls out a ReplicaSet, which creates the Pods
LabelA key/value pair attached to an object such as a Pod
Label selectorHow a client or user identifies a set of objects; the core grouping primitive of Kubernetes
NamespaceA mechanism for isolating groups of resources within a single cluster
Desired stateWhat you want your cluster's workload to look like, as you describe it by creating an object
ControllerA control loop that moves the current cluster state closer to the desired state
RolloutStarts when the Pod template changes: a new ReplicaSet scales up while the old one scales down
RevisionEach new ReplicaSet updates it; you can roll back to an earlier one
ImagePullBackOffA container could not start because Kubernetes could not pull its image; Kubernetes keeps trying with an increasing delay
kubectlThe command line tool that communicates with a cluster's control plane through the Kubernetes API
kindA tool for running local Kubernetes clusters using Docker container "nodes"

Reels on this topicএই টপিকের রিলস

Short videos from other creators, picked for this topic. They are not part of this page's fact-checked text. Nothing loads from YouTube until you press Play.অন্য ক্রিয়েটরদের বানানো ছোট ভিডিও, এই টপিকের জন্য বাছাই করা। এগুলো এই পেজের ফ্যাক্ট-চেক করা লেখার অংশ নয়। চালান বাটন চাপার আগে YouTube থেকে কিছুই লোড হয় না।

Show 7 more reelsআরও 7টি রিল দেখান
  1. [1]
    Overview

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  2. [2]
    Objects In Kubernetes

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  3. [3]
    Pods

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  4. [4]
    ReplicaSet

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  5. [5]
    Deployments

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  6. [6]
    Labels and Selectors

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  7. [7]
    Namespaces

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  8. [8]
    Pod Lifecycle

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  9. [9]
    Images

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  10. [10]
    Controllers

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  11. [11]
    Command line tool (kubectl)

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  12. [12]
    Install and Set Up kubectl on Linux

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  13. [13]
    kubectl rollout status

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  14. [14]
    kubectl Quick Reference

    Kubernetes documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  15. [15]
    kind

    kind documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18

  16. [16]
    Quick Start

    kind documentation · accessed 2026-11-18দেখা হয়েছে: 2026-11-18