Appearance
Deployments
Use a Kubernetes Deployment to keep an application running, such as a web app or background worker. Kubernetes runs containers in pods, and a deployment manages the number of pods you request and updates them when you change the app.
A deployment does not make your application reachable by itself. To send traffic to it, create a service. To make that service public, create an ingress.
Before you create a deployment
- Choose the namespace for the application.
- Decide whether it needs a public URL, connections from other apps in the cluster, or no incoming connections.
- If it needs to keep files when a pod is replaced, plan to attach storage with a
PersistentVolumeClaim. - Choose a plan with enough CPU, memory, and GPUs for the application.
Create a deployment
- Open Kubernetes / Deployments.
- Select a namespace.
- Click
Create deployment. - Fill in the deployment form.
| Console field | Description |
|---|---|
Deployment name | Kubernetes deployment name in the selected namespace |
Image | The container image to run |
Replica count | Desired running pod count |
Plan | The compute plan that sets the pod's resources |
Container port | The application port that later services may target |
Set the container port to a port your application actually listens on. Declaring the port does not configure the application or create a public URL.
Scale a deployment
Set the replica count to 0 in the console or with kubectl to stop all pods. The services and ingresses can stay in place, but requests will not reach the app until you increase the replica count above 0.
Troubleshooting
| Symptom | What to check |
|---|---|
kubectl apply is rejected | Check the pod template's compute-plan label |
| Pods stay pending | Check the selected plan, namespace quota, and pod events with kubectl describe pod |
| The console shows a deployment but traffic does not reach it | Confirm the deployment has ready pods, then create or inspect the matching service |
| A public URL cannot reach the app | Confirm the deployment is scaled above 0 and the service selector matches the deployment pod labels |
| Image startup fails | Inspect pod logs and events from the console or with kubectl logs and kubectl describe pod |