Managed K8s Basics
This page is a hands-on intro to running workloads on a managed cluster, covering the commands and manifests you touch on day one across EKS, GKE, and AKS.
Search across all documentation pages
This page is a hands-on intro to running workloads on a managed cluster, covering the commands and manifests you touch on day one across EKS, GKE, and AKS.
aws, gcloud, or az).Quick install of kubectl and Helm on Debian or Ubuntu:
curl -LO "https://dl.k8s.io/release/v1.36.2/bin/linux/amd64/kubectl"
sudo install -m 0755 kubectl /usr/local/bin/kubectl
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bashEach cloud writes a kubeconfig entry with its own CLI so kubectl can reach the managed API server.
aws eks update-kubeconfig --name prod --region us-east-1
gcloud container clusters get-credentials prod --region us-central1
az aks get-credentials --resource-group rg-prod --name prod~/.kube/config.kubectl config use-context <name>.Confirm the managed control-plane version and see your worker nodes.
kubectl version --output=yaml
kubectl get nodes -o wide-o wide shows the container runtime column, which reads containerd://....AGE and VERSION reveal node-pool upgrade drift.Namespaces are your first isolation boundary for teams and environments.
kubectl create namespace payments
kubectl label namespace payments team=paymentsA minimal Deployment runs your image with a pinned, non-root container.
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
namespace: payments
spec:
replicas: 3
selector:
matchLabels: { app: web }
template:
metadata:
labels: { app: web }
spec:
containers:
- name: web
image: ghcr.io/acme/web@sha256:abc123
ports:
- containerPort: 8080replicas: 3 spreads pods for availability.@sha256:...) makes rollouts reproducible.kubectl apply -f web.yaml.A Service gives pods a stable virtual IP and DNS name inside the cluster.
apiVersion: v1
kind: Service
metadata:
name: web
namespace: payments
spec:
selector: { app: web }
ports:
- port: 80
targetPort: 8080web.payments.svc.cluster.local.type: LoadBalancer to provision a cloud load balancer.Probes let Kubernetes restart hung pods and hold traffic until ready.
readinessProbe:
httpGet: { path: /healthz, port: 8080 }
periodSeconds: 5
livenessProbe:
httpGet: { path: /livez, port: 8080 }
periodSeconds: 10Requests drive scheduling and autoscaling; limits cap runaway pods.
resources:
requests: { cpu: "100m", memory: "128Mi" }
limits: { cpu: "500m", memory: "256Mi" }Each cloud federates pod identity so you avoid long-lived secrets.
apiVersion: v1
kind: ServiceAccount
metadata:
name: web
namespace: payments
annotations:
# EKS IRSA (or use EKS Pod Identity associations instead)
eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/web
# GKE Workload Identity
iam.gke.io/gcp-service-account: web@project.iam.gserviceaccount.comPod traffic is open by default; lock it down per namespace.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: payments
spec:
podSelector: {}
policyTypes: [Ingress, Egress]podSelector selects every pod in the namespace.The HorizontalPodAutoscaler scales replicas from live metrics.
kubectl autoscale deployment web -n payments \
--cpu-percent=70 --min=3 --max=20Stack versions: This page was written for Kubernetes 1.36.2, Docker Engine 29.6.1 (BuildKit default), containerd (CRI runtime on nodes), Helm 3, Compose v2, Argo CD (latest - verify at build), and Gateway API (GA - verify controller support at build).
Reviewed by Chris St. John·Last updated Jul 19, 2026