Continuing my Kubernetes the Hard Way homelab build. Steps 01-11 are already done, this covers step 12 which is the last step before cleanup!
Original guide: 12-smoke-test.md
Thoughts I had while doing this
For this step, I observed that we're mainly confirming that the features we set up actually work. Each section below is one small test.
Data encryption
Here we create a secret, then check how it's actually stored in etcd. This ties back to step 06, where we set up the encryption key and config.
root@jumpbox:~# kubectl create secret generic kubernetes-the-hard-way \ --from-literal="mykey=mydata" secret/kubernetes-the-hard-way created root@jumpbox:~# ssh root@server \ 'etcdctl get /registry/secrets/default/kubernetes-the-hard-way | hexdump -C' 00000000 2f 72 65 67 69 73 74 72 79 2f 73 65 63 72 65 74 |/registry/secret| 00000010 73 2f 64 65 66 61 75 6c 74 2f 6b 75 62 65 72 6e |s/default/kubern| 00000020 65 74 65 73 2d 74 68 65 2d 68 61 72 64 2d 77 61 |etes-the-hard-wa| 00000030 79 0a 6b 38 73 3a 65 6e 63 3a 61 65 73 63 62 63 |y.k8s:enc:aescbc| 00000040 3a 76 31 3a 6b 65 79 31 3a 7f 65 0c d1 d6 78 8a |:v1:key1:.e...x.| ... 0000015a The giveaway is the k8s:enc:aescbc:v1:key1 prefix. It means the secret was stored encrypted, and the rest is unreadable ciphertext instead of my plain mydata value. So the encryption at rest from step 06 is working.
Deployments
This is the part that interested me most, since it's where we actually deploy an application. In this case, an nginx instance.
root@jumpbox:~# kubectl get pods -l app=nginx No resources found in default namespace. root@jumpbox:~# kubectl create deployment nginx \ --image=nginx:latest deployment.apps/nginx created root@jumpbox:~# kubectl get pods NAME READY STATUS RESTARTS AGE nginx-54c98b4f84-pz784 0/1 ContainerCreating 0 3s ... root@jumpbox:~# kubectl get pods NAME READY STATUS RESTARTS AGE nginx-54c98b4f84-pz784 1/1 Running 0 64s root@jumpbox:~# kubectl get pods -l app=nginx NAME READY STATUS RESTARTS AGE nginx-54c98b4f84-pz784 1/1 Running 0 96s I re-ran kubectl get pods a few times while it was stuck on ContainerCreating (that's the first pull of the nginx image). After about a minute it went to Running, and the nginx instance was up.
Port forwarding
This part was pretty straightforward. We're basically taking the port of the running nginx app and binding it to a port on the jumpbox.
root@jumpbox:~# POD_NAME=$(kubectl get pods -l app=nginx \ -o jsonpath="{.items[0].metadata.name}") root@jumpbox:~# kubectl port-forward $POD_NAME 8080:80 Unable to listen on port 8080: Listeners failed to create with the following errors: [unable to create listener: Error listen tcp4 127.0.0.1:8080: bind: address already in use unable to create listener: Error listen tcp6 [::1]:8080: bind: address already in use] error: unable to listen on any of the requested ports: [{8080 80}] In my case, port 8080 was already taken by another app I have running on the jumpbox. Confirmed with netstat:
root@jumpbox:~# netstat -tulpn ... tcp6 0 0 :::8080 :::* LISTEN <PID>/<process> ... So I used port 8081 instead, which worked:
root@jumpbox:~# kubectl port-forward $POD_NAME 8081:80 Forwarding from 127.0.0.1:8081 -> 80 Forwarding from [::1]:8081 -> 80 Handling connection for 8081 The Handling connection for 8081 line is the request from my curl check coming through.
Logs
Also very straightforward. This just pulls the logs from the nginx app:
root@jumpbox:~# kubectl logs $POD_NAME /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration ... /docker-entrypoint.sh: Configuration complete; ready for start up 2026/11/25 18:17:12 [notice] 1#1: using the "epoll" event method 2026/11/25 18:17:12 [notice] 1#1: nginx/1.31.10 ... 2026/11/25 18:17:12 [notice] 1#1: start worker processes 127.0.0.1 - - [25/Nov/2026:18:26:55 +0000] "HEAD / HTTP/1.1" 200 0 "-" "curl/7.81.0" "-" The last line is the request from the port-forward test, so the logs are showing real traffic.
Exec
Here we run a command inside the container hosted on the pod:
root@jumpbox:~# kubectl exec -ti $POD_NAME -- nginx -v nginx version: nginx/1.31.10 Services
I didn't get this part at first. It seemed like we were doing the exact same thing as port forwarding. Here's the difference as I understand it:
- Port forwarding is a temporary tunnel from a port on my jumpbox to one specific pod. It only exists while the
kubectl port-forwardcommand is running, and only my jumpbox can use it. - A Service is a permanent object in the cluster that gives a stable way to reach all the pods matching a label (here,
app=nginx). With typeNodePort, the same port gets opened on every node, so anything that can reach a node can use it. kube-proxy, which we set up in step 09, is what makes that work on each node.
root@jumpbox:~# kubectl expose deployment nginx \ --port 80 --type NodePort service/nginx exposed root@jumpbox:~# NODE_PORT=$(kubectl get svc nginx \ --output=jsonpath='{range .spec.ports[0]}{.nodePort}') root@jumpbox:~# NODE_NAME=$(kubectl get pods \ -l app=nginx \ -o jsonpath="{.items[0].spec.nodeName}") root@jumpbox:~# curl -I http://${NODE_NAME}:${NODE_PORT} HTTP/1.1 200 OK Server: nginx/1.31.10 Date: Thu, 26 Nov 2026 12:50:05 GMT Content-Type: text/html Content-Length: 896 Last-Modified: Thu, 19 Nov 2026 16:56:13 GMT Connection: keep-alive ETag: "6aff2a2d-380" Accept-Ranges: bytes NODE_NAME resolves from the jumpbox thanks to the /etc/hosts entries from step 03, and the 200 OK from nginx confirms the Service works.
Summary
Step 12 was the smoke test, and everything passed: secrets are encrypted at rest in etcd, a deployment runs on the workers, and port forwarding, logs, exec, and a NodePort Service all work. That's basically the whole shebang for Kubernetes The Hard Way.





