In Kubernetes, how to set pods' names when using replication controllers? : <p>I have a simple replication controller yaml file which looks like this:</p>

<pre><code>apiVersion: v1
kind: ReplicationController
metadata:
  name: nginx
spec:
  replicas: 3
  selector:
    app: nginx
  template:
    spec:
      containers:
      - image: library/nginx:3.2
        imagePullPolicy: IfNotPresent
        name: nginx
        ports:
        - containerPort: 80
    metadata:
      labels:
        app: nginx
</code></pre>

<p>And after running this replication controller, I will get 3 different pods whose names are "nginx-xxx", where "xxx" represents a random string of letters and digits.</p>

<p>What I want is to specify names for the pods created by the replication controller, so that the pods' name can be "nginx-01", "nginx-02", "nginx-03". And further more, for say if pod "nginx-02" is down for some reason, and replication controller will automatically create another nginx pod, and I want this new nginx pod's name to remain as "nginx-02".</p>

<p>I wonder if this is possible? Thanks in advance.</p>
