GitHub holds source code, but Kubernetes does not necessarily build that code. Fetching source, building images, submitting deployment changes and running Pods can take place on different machines.
Follow the artifact
A common path is GitHub → CI runner → container registry → Kubernetes. A CI runner such as GitHub Actions builds an image and pushes it to the registry. Worker nodes fetch the image and run it as Pod containers.
A Bastion host is one way to control access to internal infrastructure. kubectl is a client of the Kubernetes API and can work from any properly connected and authorized management environment.
When a Bastion host ran out of disk space
Pulling source onto a Bastion host and building the image there led to a full disk. The cause should not be attributed to git pull alone: image layers, build caches, installed dependencies and logs also consume space.
Moving image builds to a CI runner limits build artifacts on a management host. The CI runner and registry still need capacity limits, retention rules and appropriate access controls.
Useful distinctions when checking a service
| Command | What it checks |
|---|---|
| kubectl config current-context | Selected Kubernetes context |
| kubectl get pods -A -o wide | Pod IPs and node placement |
| kubectl -n production get deploy,svc,ingress | Workload and routing resources |
| df -h | Filesystem use on the current host |
| docker system df | Docker image and cache use where Docker runs |
kubectl apply changes the declared state; rollout restart requests a new workload rollout. Neither is the same operation as building a container image.
Image built, Pod ready, and website reachable are three separate milestones.