Cheat Sheets / Kubernetes & Platform

Build an Internal Developer Platform cheat sheet

63 commands from every lesson of Build an Internal Developer Platform — Backstage, Golden Paths & Crossplane, on one page.

01 · What an internal developer platform is

Questions to ask before building

Where do developers wait?Tickets for repos, namespaces, DNS, databases, access
What do they copy?Pipelines, Dockerfiles, manifests copied from another team
What breaks most in production?Missing probes, limits, alerts: candidates for defaults
What must every service prove?Signed images, owner, on-call, audit trail: build it into the path

02 · Lab: hub and workload clusters on kind

Lab housekeeping

kind get clustershub, wl-1, wl-2
kind get kubeconfig --name wl-1 --internalKubeconfig using container DNS (what the hub must use)
kubectl -n argocd get secret -l argocd.argoproj.io/secret-type=cluster --show-labelsRegistered clusters and their labels
argocd login localhost:8080 --plaintext --username admin --password <pw>Argo CD CLI against the lab (no TLS)
argocd cluster listClusters Argo CD can deploy to
docker stop hub-control-plane wl-1-control-plane wl-2-control-planePause the lab without losing state

03 · Backstage architecture

Working with a Backstage app

npx @backstage/create-app@latestCreate a new Backstage app
yarn startRun frontend (:3000) and backend (:7007) locally
yarn --cwd packages/backend add <plugin-package>Add a backend plugin or module
yarn backstage-cli versions:bumpUpgrade all Backstage packages to the latest release
yarn build:backend && yarn build-imageBuild the backend and a container image
curl localhost:7007/.backstage/health/v1/readinessBackend readiness

04 · The software catalog

Catalog API (backend on :7007)

curl -s localhost:7007/api/catalog/entities/by-query?filter=kind=component | jq '.items[].metadata.name'List components
curl -s localhost:7007/api/catalog/entities/by-name/component/default/orders | jq .relationsRelations of one entity
curl -s -X POST localhost:7007/api/catalog/refresh -H 'content-type: application/json' -d '{"entityRef":"component:default/orders"}'Ask the catalog to refresh one entity

Annotations you will use

backstage.io/techdocs-ref: dir:.Docs live in this repo
backstage.io/kubernetes-id: ordersFind this component's workloads in clusters
argocd/app-name: ordersLink to the Argo CD application
backstage.io/source-location: url:https://git/…Where the code lives

05 · Software templates

Template development

http://localhost:3000/create/editTemplate editor: load a local template and dry-run it
http://localhost:3000/create/actionsEvery installed scaffolder action with its inputs
http://localhost:3000/create/tasksPast runs and their logs
${{ parameters.name }}A form value inside template.yaml
${{ values.name }}A value inside the skeleton files
${{ steps['publish'].output.remoteUrl }}Output of an earlier step

06 · From template to every cluster

Watch the fleet

kubectl -n argocd get applicationsetApplicationSets and their conditions
kubectl -n argocd get app -l fleet.example.io/service=tenant-apiOne service across all clusters
kubectl -n argocd logs deploy/argocd-applicationset-controller | tailWhy an ApplicationSet produced nothing
kubectl -n argocd get applicationset golden-fleet -o jsonpath='{range .status.applicationStatus[*]}{.application}:{.status} {end}'Progressive sync status per app (Waiting, Pending, Progressing, Healthy)
argocd app terminate-op <app>Stop a stuck sync after fixing Git

07 · Self-service onboarding

Check what was generated

kubectl get networkpolicy,resourcequota,limitrange,rolebinding -n <team-ns>The objects the platform guarantees
kubectl get clusterpolicyInstalled Kyverno policies and their readiness
kubectl get updaterequests -n kyvernoPending or failed generate requests
kubectl delete networkpolicy team-default-deny -n <team-ns> && sleep 5 && kubectl get networkpolicy -n <team-ns>Drift test: it should come back

08 · Platform APIs with Crossplane

Inspect Crossplane

kubectl get xrdPlatform APIs and whether they are established
kubectl get composition -L providerImplementations, labelled by backend
kubectl get databases -ARequests made by teams (composite resources)
crossplane beta trace database orders -n team-shopEverything one request created, with readiness (newer CLIs: crossplane resource trace)
kubectl get managedAll cloud resources Crossplane manages
kubectl annotate database orders -n team-shop crossplane.io/paused=truePause reconciliation (break-glass)

09 · Day 2: keeping golden paths healthy

Keeping services current

renovate.json: { "extends": ["config:recommended"] }Automated dependency and base-version PRs
resources: [ https://git.example.com/platform/bases//web?ref=v1.4.0 ]Kustomize: consume a versioned shared base
include: { component: git.example.com/platform/ci/build@v2 }GitLab CI component pinned to a version
git grep -l 'platform/bases//web?ref=v1.' -- '*/kustomization.yaml'Who is still on the old base

10 · Measuring the platform

The four DORA metrics

Deployment frequencyHow often changes reach production (elite: on demand, many per day)
Lead time for changesCommit to running in production (elite: under a day)
Change failure rateShare of deployments causing an incident or rollback
Time to restore serviceFrom failure to recovery (elite: under an hour)

Platform measures

Time to first deployTemplate run → healthy in every cluster
AdoptionShare of services on the golden path / current building blocks
Ticket volumeRequests the platform still handles manually
Developer satisfactionShort regular survey, plus open comments

11 · Capstone: design a platform for 300 services

Design review checklist

Users and painWho are the developers, what do they wait for, what do they copy?
InterfacesPortal, CLI, Git: which first, and is the portal replaceable?
Golden pathsWhich workflows first? Thin templates + versioned building blocks?
DeliveryGitOps, rings, progressive delivery, rollback by git revert
Infrastructure APIsWhich resources become self-service, on which backends?
Guard-railsOnboarding kit, admission policy, identity, cost
ProductPilot teams, adoption plan, support, deprecation, metrics