Skip to content

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

  1. Open Kubernetes / Deployments.
  2. Select a namespace.
  3. Click Create deployment.
  4. Fill in the deployment form.
Console fieldDescription
Deployment nameKubernetes deployment name in the selected namespace
ImageThe container image to run
Replica countDesired running pod count
PlanThe compute plan that sets the pod's resources
Container portThe 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

SymptomWhat to check
kubectl apply is rejectedCheck the pod template's compute-plan label
Pods stay pendingCheck the selected plan, namespace quota, and pod events with kubectl describe pod
The console shows a deployment but traffic does not reach itConfirm the deployment has ready pods, then create or inspect the matching service
A public URL cannot reach the appConfirm the deployment is scaled above 0 and the service selector matches the deployment pod labels
Image startup failsInspect pod logs and events from the console or with kubectl logs and kubectl describe pod
  • Read Services to expose the deployment inside the cluster.
  • Read Ingresses to publish a service with HTTP routing.
  • Read Storage to attach persistent storage.

RemoteGPU customer documentation