title: Kubectl generate pod with same name all time
body: <p>I am new to kubernetes. Is there anyway we can fix the name of pod ?   If we are creating only one replica, then I want to be generated with same name all time. It's generating different name all time. If I want to see the logs of a container, each time I need to change the command with the newly generated pod name.</p>
  
  <p>Following is sample of YAML file.</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    name: nagendra-app-deploy1
  spec:
    replicas: 1
    template:
      metadata:
        name: nagendra-app-deploy1
        labels:
          app: nagendra-app-deploy1
      spec:
        containers:
        - name: nagendra-spring-app1
          image: springbootapp:v1
          ports:
          - containerPort: 8080
        - name: nagendra-myImage
          image: myImage:v2
  </code></pre>