Happy Birthday Kubernetes! with the ID of the pods
116
The simplest way to create a new deployment for a single-container pod is to use kubectl run:
kubectl run webk8sbirthday \
--image=sylhare/webk8sbirthday:1.0.1 \
--port=8080 \
--replicas=2 \
--record
To access the webk8sbirthday, create a new service using kubectl expose deployment:
kubectl expose deployment webk8sbirthday --type=NodePort
To get the exposed port number execute:
kubectl describe services/webk8sbirthday | grep ^NodePort
Let's open our web site in the browser via PublicIP.
curl ifconfig.co
And build following URL and append to you browser:
http://<PublicIP>:<NodePort>/grid?cols=3&rows=4
Content type
Image
Digest
Size
2.5 MB
Last updated
about 8 years ago
docker pull sylhare/webk8sbirthday:1.0.2