<p>I am using Kubernetes deployment. I wish to start the pods one by one. Not all at once. Is there any way. I do not want to use statefulSet.</p>
<pre><code>kind: Deployment
metadata:
  name: my-deployment
  labels:
    app: my-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: my-app
        image: my-container-image
        ports:
        - name: https
          containerPort: 8443
        volumeMounts:
            - mountPath: /tmp
              name: app-vol
        restartPolicy: Always
      imagePullSecrets:
        - name: regcred
      volumes:
        - name: app-vol
          persistentVolumeClaim:
            claimName: app-vol
</code></pre>

<blockquote>
<p>I wish to start the pods one by one. Not all at once. Is there any way. I do not want to use statefulSet.</p>
</blockquote>
<p>Unfortunately you are trying to accomplish something with <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="nofollow noreferrer"><code>Deployment</code></a> that is achievable with <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="nofollow noreferrer"><code>Statefulset</code></a>. Is it possible to achieve the desired effect with deployment? A similar one can be obtained, but it will require <a href="https://stackoverflow.com/questions/66365892/limit-first-time-deployment-of-pods-in-kubernetes-using-kind-deployment/66641268#66641268">creating a custom script</a> and it will be a non-standard solution.</p>
<p>However, this will not be a recommended solution. Statefulset works well for feed control during starts, and you shouldn't use anything else here.</p>
<p>To sum up: you should change the assumptions a bit and accept the statefulset, thanks to which you will achieve the result you want, or you should not control the order in which the pods are run.</p>
<p>As <a href="https://stackoverflow.com/users/4551228/rohatgisanat" title="620 reputation">rohatgisanat</a> mentioned in the comment:</p>
<blockquote>
<p>Deployments do not guarantee ordered starts. StatefulSets are the way to achieve what you require.</p>
</blockquote>
