With our Deployment manifest ready, let's deploy it onto our remote cluster. You should be familiar with the drill by now—simply run kubectl apply:
$ kubectl apply -f ./manifests/backend/deployment.yaml
deployment.apps "backend" created
Check the status of the Deployment using kubectl get all:
$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/backend-6d58f66658-6wx4f 1/1 Running 0 21s
pod/backend-6d58f66658-rzwnl 1/1 Running 0 21s
pod/backend-6d58f66658-wlsdz 1/1 Running 0 21s
pod/elasticsearch-0 1/1 Running 0 18h
pod/elasticsearch-1 1/1 Running 0 20h
pod/elasticsearch-2 1/1 Running 0 20h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
service/elasticsearch ClusterIP None <none> 9200/TCP,9300/TCP
service/kubernetes ClusterIP 10.32.0.1 <none> 443/TCP
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.apps/backend 3 3 3 3 21s
NAME DESIRED CURRENT READY AGE
replicaset.apps/backend-6d58f66658 3 3 3 21s
NAME DESIRED CURRENT AGE
statefulset.apps/elasticsearch 3 3 20h
You can also check the logs for the backend Pods. If you get back a message saying the server is listening on port 8080, the deployment was successful:
$ kubectl logs pod/backend-6d58f66658-6wx4f
Hobnob API server listening on port 8080!