k8wiz
Playground

Deploy and expose your first app

Beginner · Kubernetes · about 10 min

The cluster is empty apart from its system Pods. You'll run nginx as a Deployment, scale it to three replicas, give it a stable name with a Service, and call it from another Pod.

Loading the playground...

About this scenario

The cluster is empty apart from its system Pods. You'll run nginx as a Deployment, scale it to three replicas, give it a stable name with a Service, and call it from another Pod.

Watch the graph while you work: each command adds objects, and the Deployment creates a ReplicaSet that creates the Pods.

Objectives

  1. Create a Deployment named web running nginx
  2. Scale it to 3 ready replicas
  3. Expose it with a Service named web on port 80
  4. Fetch the page from another Pod

What you'll practice

  • A Deployment manages ReplicaSets, and the ReplicaSet keeps the Pod count.
  • A Service finds Pods by label and gives them one DNS name, web.default.svc.cluster.local.
  • kubectl exec runs a command inside a container, so you see the cluster's network from the inside.

How the playground works

The cluster runs entirely in your browser: a simulated API server, scheduler, kubelets and controllers, with virtual nodes in three zones. kubectl output follows the real formats, errors use the real messages, and the add-ons (CSI storage, Traefik, Envoy Gateway, cert-manager, Flux, Argo CD) behave like their real counterparts for the common paths. It's a simulation, so some behavior is simplified. Your progress is saved in this browser.

Read next