April 2018
Intermediate to advanced
374 pages
8h 35m
English
Now, let's run the container we just made. We will use the kubectl run command as with the Python example, but replacing flask with nodejs to specify the container we just made and uploaded:
kubectl run nodejs --image=quay.io/kubernetes-for-developers/nodejs:0.2.0 --port=3000deployment “nodejs” created
To see what it's doing, we need to ask the cluster for the current state of the resources we just created:
kubectl get deploymentsNAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGEnodejs 1 1 1 1 1dkubectl get podsNAME READY STATUS RESTARTS AGEnodejs-568183341-2bw5v 1/1 Running 0 1d
The kubectl run command works regardless of the language, and in the same fashion as the Python example. The simple deployment created in this ...
Read now
Unlock full access