The node was silent, waiting for orders. You hold the keys. One command and your self-hosted deployment comes alive.
Running kubectl for self-hosted deployment is direct, fast, and under your control. No dependency on external platforms. Your cluster is yours. The process is simple, but precision matters.
First, configure your kubeconfig to point to the correct cluster. If your cluster is on bare metal, inside a private cloud, or air-gapped, make sure the API server is reachable from your workstation or CI pipeline. Test connectivity with:
kubectl get nodes
When you see the list, you have a live path.
Prepare your deployment manifest. Define apiVersion, kind: Deployment, metadata, and spec. Set replicas to match your capacity. Include container images from your own registry if isolation is critical. Example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-app-container
image: registry.local/my-app:latest
ports:
- containerPort: 8080
Apply with: