Examining the deployment

The redis-master deployment should be complete by now. On Azure Cloud Shell, type the following:

kubectl get all

You should get an output that looks something like this:

 NAME READY STATUS RESTARTS AGE
pod/redis-master-6b464554c8-554p8 1/1 Running 0 3h

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/Kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 4h

NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.apps/redis-master 1 1 1 1 3h

NAME DESIRED CURRENT READY AGE
replicaset.apps/redis-master-6b464554c8 1 1 1 3h

You can see that we have a deployment named redis-master. It controls a replica set of redis-master-<random id>. Digging deeper, you will also find that the Replica Set is controlling Pod (a group of Docker containers that should be run together): redis-master-<replica set random id&gt;->random id&gt;.

More details can be obtained by typing kubectl describe <instance -name>, as follows:

kubectl describe deployment/redis-master

This will give us the following output:

Name: redis-master
Namespace: default
CreationTimestamp: Wed, 26 Dec 2018 01:47:56 +0000
Labels: app=redis
Annotations: deployment.Kubernetes .io/revision=1
kubectl.Kubernetes .io/last-applied-configuration={"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"labels":{"app":"redis"},"name":"redis-master","namespace":"default"},"spec":{...
Selector: app=redis,role=master,tier=backend
Replicas: 1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 25% max unavailable, 25% max surge
Pod Template:
Labels: app=redis
role=master
tier=backend
Containers:
master:
Image: k8s.gcr.io/redis:e2e
Port: 6379/TCP
Host Port: 0/TCP
Requests:
cpu: 100m
memory: 100Mi
Environment: <none>
Mounts: <none>
Volumes: <none>
Conditions:
Type Status Reason
---- ------ ------
Available True MinimumReplicasAvailable
Progressing True NewReplicaSetAvailable
OldReplicaSets: <none>
NewReplicaSet: redis-master-6b464554c8 (1/1 replicas created)
Events: <none>

In true internet fashion, launching an application without any environment-specific configuration has already become obsolete. We will introduce a new concept called ConfigMaps and then resume the regularly-scheduled program. First, we need to clean up, and we can do so by running the following command:

kubectl delete deployment/redis-master

You will see the following output:

deployment.extensions "redis-master" deleted

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset