Skip to content

Quick start

View as Markdown

Deploy hello-kubernetes into your current namespace, with its default settings. You need kubectl and a cluster; Helm also needs Helm 4.

Terminal
kubectl apply -f https://github.com/paulbouwer/hello-kubernetes/releases/latest/download/hello-kubernetes.yaml
kubectl rollout status deployment/hello-kubernetes-demo

It creates a ServiceAccount, a Service and a Deployment with 2 pods, all named hello-kubernetes-demo.

Forward a local port to the Service:

Terminal
kubectl port-forward service/hello-kubernetes-demo 8080:80

Open http://localhost:8080/. You see Hello world!, and the namespace, pod and node that answered. Press Ctrl+C to stop.

port-forward connects to one pod, so the pod name stays the same when you refresh. Through the Service’s external address, each request can reach a different pod.

The Service is a LoadBalancer, so on many clusters it also gets an external address. See where the external address works. To watch requests reach different pods, see Show load balancing.

Terminal
kubectl delete -f https://github.com/paulbouwer/hello-kubernetes/releases/latest/download/hello-kubernetes.yaml