anchor.diff:  	$ kubectl delete rs/nginx-replicaset
   	replicaset "nginx-replicaset" deleted
   
  -== Services
  +== Service
   
   A pod is ephemeral. Each pod is assigned a unique IP address. If a pod that belongs to a replication controller dies, then it is recreated and may be given a different IP address. Further, aAdditional pods may be created using Deployment or Replica Set. This makes it difficult for an application server, such as WildFly, to access a database, such as MySQL, using its IP address.
   
  
positive.code: 
  The output shows that the job was successfully executed.
  
  The list of completed pods can be seen using the following command:
  
  	$ kubectl get pods --show-all
  	NAME         READY     STATUS      RESTARTS   AGE
  
negative.code: 
  === Parallel Job
  
  Non-parallel job runs one only one pod per job. This API is used to run multiple pods in parallel for the job. The number of pods to complete is defined by `.spec.completions` attribute in the configuration file. The number of pods to run in parallel is defined by `.spec.parallelism` attribute in the configuration file. The default value for both of these attributes is 1.
  
  The job is complete when there is one successful pod for each value in the range in 1 to `.spec.completions`. For that reason, it is also called as _fixed completion count_ job.
  
  Here is a job specification:
  
  	apiVersion: batch/v1
  	kind: Job
  	metadata:
  	  name: wait
  	spec:
  	  completions: 6
  	  parallelism: 2
  	  template:
  	    metadata:
  	      name: wait
  	    spec:
  	      containers:
  	      - name: wait
  	        image: ubuntu
  	        command: ["sleep",  "20"]
  	      restartPolicy: Never
  
  This job specification is similar to the non-parallel job specification. It has two new attributes added: `.spec.completions` and `.spec.parallelism`. This means the job will be complete when six pods have successfully completed. A maximum of two pods will run in parallel at a given time.
  
  Create a parallel job using the command:
  
  	kubectl apply -f templates/job-parallel.yaml
  
  Watch the status of the job as shown:
  
  	$ kubectl get -w jobs
  	NAME      DESIRED   SUCCESSFUL   AGE
  	wait      6         0            2s
  	wait      6         1         22s
  	wait      6         2         22s
  	wait      6         3         43s
  	wait      6         4         43s
  	wait      6         5         1m
  	wait      6         6         1m
  
  The output shows that 2 pods are created about every 20 seconds.
  
  In another terminal window, watch the status of pods created:
  
  	$ kubectl get -w pods -l job-name=wait
  	NAME         READY     STATUS    RESTARTS   AGE
  	wait-f7kgb   1/1       Running   0          5s
  	wait-smp4t   1/1       Running   0          5s
  	wait-smp4t   0/1       Completed   0         22s
  	wait-jbdp7   0/1       Pending   0         0s
  	wait-jbdp7   0/1       Pending   0         0s
  	wait-jbdp7   0/1       ContainerCreating   0         0s
  	wait-f7kgb   0/1       Completed   0         22s
  	wait-r5v8n   0/1       Pending   0         0s
  	wait-r5v8n   0/1       Pending   0         0s
  	wait-r5v8n   0/1       ContainerCreating   0         0s
  	wait-r5v8n   1/1       Running   0         1s
  	wait-jbdp7   1/1       Running   0         1s
  	wait-r5v8n   0/1       Completed   0         21s
  	wait-ngrgl   0/1       Pending   0         0s
  	wait-ngrgl   0/1       Pending   0         0s
  	wait-ngrgl   0/1       ContainerCreating   0         0s
  	wait-jbdp7   0/1       Completed   0         21s
  	wait-6l22s   0/1       Pending   0         0s
  	wait-6l22s   0/1       Pending   0         0s
  	wait-6l22s   0/1       ContainerCreating   0         0s
  	wait-ngrgl   1/1       Running   0         1s
  	wait-6l22s   1/1       Running   0         1s
  	wait-ngrgl   0/1       Completed   0         21s
  	wait-6l22s   0/1       Completed   0         21s
  
  After all the pods have completed, `kubectl get pods` will not show the lis of completed pods. The command to show the list of pods is shown below:
  
  	$ kubectl get pods -a
  	NAME         READY     STATUS      RESTARTS   AGE
  	wait-6l22s   0/1       Completed   0          1m
  	wait-f7kgb   0/1       Completed   0          2m
  	wait-jbdp7   0/1       Completed   0          2m
  	wait-ngrgl   0/1       Completed   0          1m
  	wait-r5v8n   0/1       Completed   0          2m
  	wait-smp4t   0/1       Completed   0          2m
  
  Similarly, `kubectl get jobs` shows the status of the job after it has completed:
  
  	$ kubectl get jobs
  	NAME      DESIRED   SUCCESSFUL   AGE
  	wait      6         6            3m
  
  Deleting a job deletes all the pods as well. Delete the job as:
  
  	$ kubectl delete -f templates/job-parallel.yaml
  
  == Cron Job
  
  