<p>I created a deployment like this:</p>

<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: scs-db-sink
spec:
  selector:
    matchLabels:
      app: scs-db-sink
  replicas: 1 
  template: 
    metadata:
      labels:
        app: scs-db-sink
    spec:
      nodeSelector:
        cloud.google.com/gke-nodepool: service-pool
      containers:
      - name: scs-db-sink
        image: 'IMAGE_NAME'
        imagePullPolicy: Always
        ports:
        - containerPort: 1068
</code></pre>

<p><em>kubectl get pods</em> shows me that the pod is running:</p>

<pre><code>scs-db-sink-74c4b6cd6b-tchm9   1/1     Running   0          16m
</code></pre>

<p>Question:
How can I setup the pod name to be scs-db-sink-0 and increase to scs-db-sink-1 when I scale up?</p>

<p>Thanks</p>

Alex Tbk
<p>Deployments pods are named as <code>&lt;replicaset-name&gt;-&lt;random-suffix&gt;</code> where replicaset name is <code>&lt;deployment-name&gt;-&lt;random-suffix&gt;</code>. Here, replicaset is created automatically by deployment. So, you can't achieve your expected name with deployment.</p>

<p>However, you can use Statefulset in this case. Statefulset's pods are named as you specified. Check about Statefulset <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="nofollow noreferrer">here</a>.</p>
