Kubernetes Platform
Overview
You own the cluster as a product: provisioning, the add-on baseline, capacity, upgrades and the contract offered to application teams. Every command goes through the infra engine.
When to use
- Create a cluster (managed or self-hosted), add a node pool, install the platform baseline.
- Upgrade control plane, nodes and add-ons.
- Install or manage operators and CRDs.
Engine
infra action=status - kube contexts and which are production.
infra action=discover provider=kubernetes context=<ctx> (CRDs included) plus the cloud provider and provider=helm.
infra action=graph op=build sources=[kubernetes,aws] then op=impact node=<namespace|nodepool> before draining or upgrading.
infra action=check on every kubectl/helm/eksctl/gcloud/az command; infra action=access for kubectl auth can-i.
infra action=plan for upgrades and baseline installs; infra action=run then infra action=verify.
Workflow
- Provision - managed:
eksctl/Terraform (EKS), gcloud container clusters create (GKE, regional), az aks create (AKS, zones 1 2 3); self-hosted: K3s, RKE2, MicroK8s with HA control plane (3 servers, embedded etcd).
- Baseline - ingress controller (ingress-nginx, AWS LB Controller, Traefik, Gateway API), cert-manager with ClusterIssuer, external-dns scoped to a zone, metrics-server, Cluster Autoscaler or Karpenter, HPA/VPA, default StorageClass (gp3, pd-balanced, managed-csi, Longhorn), CSI snapshot controller, NetworkPolicies default-deny, PodSecurity admission, observability stack.
- Tenancy - namespaces, ResourceQuota, LimitRange, RBAC per team.
- Operators - install via Helm or OLM, pin versions, check CRD upgrade notes.
- Upgrades - one minor at a time: check deprecated APIs (
kubent, pluto), add-on compatibility, PodDisruptionBudgets; control plane, then node pools (surge), then add-ons.
Command families
kubectl config get-contexts; kubectl version; kubectl get nodes -o wide
kubectl api-resources; kubectl get crd
kubectl get sc; kubectl get pdb -A; kubectl top nodes
kubectl diff -f manifests/; kubectl apply --dry-run=server -f manifests/
kubectl cordon <n>; kubectl drain <n> --ignore-daemonsets --delete-emptydir-data
eksctl get cluster; eksctl upgrade cluster --name <c> --approve
aws eks describe-addon-versions --kubernetes-version 1.30
gcloud container clusters upgrade <c> --master --cluster-version <v> --region <r>
az aks get-upgrades -g <rg> -n <c>; az aks upgrade -g <rg> -n <c> --kubernetes-version <v>
k3s kubectl get nodes; rke2 --version; microk8s status
helm upgrade --install cert-manager jetstack/cert-manager -n cert-manager --set crds.enabled=true
Safety rules
- Upgrades, drains, node pool deletion, CRD deletion and changes on production contexts are critical: user validation.
- Always
kubectl diff / --dry-run=server / helm diff before apply.
- Never delete a CRD without listing its custom resources first (deleting it deletes them).
Verification and rollback
- Verify: all nodes Ready at the target version,
kubectl get pods -A no CrashLoop, certificates Ready, ingress answers over TLS, autoscaler logs clean.
- Rollback: managed control planes cannot downgrade - mitigate with a new node pool on the previous version and workload rollback;
helm rollback for add-ons; etcd snapshot restore for self-hosted.
Deliverable
Cluster inventory (versions, node pools, add-ons), changes applied with run ids, verification evidence, upgrade notes, rollback path.
1---2name: kubernetes-platform3description: Build and operate Kubernetes platforms - EKS, GKE, AKS, OpenShift, K3s, RKE2, MicroK8s - with ingress, cert-manager, external-dns, autoscaling, storage classes, CRDs/operators and version upgrades. Use for cluster creation, platform add-ons and upgrades; use kubernetes-operator for workload debugging.4metadata:5 source: https://skillmd.com/skills/navinspire-ia/kubernetes-platform6 navin:7 emoji: 🛳️8 category: devops9---1011# Kubernetes Platform1213## Overview1415You own the cluster as a product: provisioning, the add-on baseline, capacity, upgrades and the contract offered to application teams. Every command goes through the `infra` engine.1617## When to use1819- Create a cluster (managed or self-hosted), add a node pool, install the platform baseline.20- Upgrade control plane, nodes and add-ons.21- Install or manage operators and CRDs.2223## Engine24251. `infra action=status` - kube contexts and which are production.262. `infra action=discover provider=kubernetes context=<ctx>` (CRDs included) plus the cloud provider and `provider=helm`.273. `infra action=graph op=build sources=[kubernetes,aws]` then `op=impact node=<namespace|nodepool>` before draining or upgrading.284. `infra action=check` on every kubectl/helm/eksctl/gcloud/az command; `infra action=access` for `kubectl auth can-i`.295. `infra action=plan` for upgrades and baseline installs; `infra action=run` then `infra action=verify`.3031## Workflow32331. **Provision** - managed: `eksctl`/Terraform (EKS), `gcloud container clusters create` (GKE, regional), `az aks create` (AKS, zones 1 2 3); self-hosted: K3s, RKE2, MicroK8s with HA control plane (3 servers, embedded etcd).342. **Baseline** - ingress controller (ingress-nginx, AWS LB Controller, Traefik, Gateway API), cert-manager with ClusterIssuer, external-dns scoped to a zone, metrics-server, Cluster Autoscaler or Karpenter, HPA/VPA, default StorageClass (gp3, pd-balanced, managed-csi, Longhorn), CSI snapshot controller, NetworkPolicies default-deny, PodSecurity admission, observability stack.353. **Tenancy** - namespaces, ResourceQuota, LimitRange, RBAC per team.364. **Operators** - install via Helm or OLM, pin versions, check CRD upgrade notes.375. **Upgrades** - one minor at a time: check deprecated APIs (`kubent`, `pluto`), add-on compatibility, PodDisruptionBudgets; control plane, then node pools (surge), then add-ons.3839## Command families4041```bash42kubectl config get-contexts; kubectl version; kubectl get nodes -o wide43kubectl api-resources; kubectl get crd44kubectl get sc; kubectl get pdb -A; kubectl top nodes45kubectl diff -f manifests/; kubectl apply --dry-run=server -f manifests/46kubectl cordon <n>; kubectl drain <n> --ignore-daemonsets --delete-emptydir-data47eksctl get cluster; eksctl upgrade cluster --name <c> --approve48aws eks describe-addon-versions --kubernetes-version 1.3049gcloud container clusters upgrade <c> --master --cluster-version <v> --region <r>50az aks get-upgrades -g <rg> -n <c>; az aks upgrade -g <rg> -n <c> --kubernetes-version <v>51k3s kubectl get nodes; rke2 --version; microk8s status52helm upgrade --install cert-manager jetstack/cert-manager -n cert-manager --set crds.enabled=true53```5455## Safety rules5657- Upgrades, drains, node pool deletion, CRD deletion and changes on production contexts are critical: user validation.58- Always `kubectl diff` / `--dry-run=server` / `helm diff` before apply.59- Never delete a CRD without listing its custom resources first (deleting it deletes them).6061## Verification and rollback6263- Verify: all nodes Ready at the target version, `kubectl get pods -A` no CrashLoop, certificates Ready, ingress answers over TLS, autoscaler logs clean.64- Rollback: managed control planes cannot downgrade - mitigate with a new node pool on the previous version and workload rollback; `helm rollback` for add-ons; etcd snapshot restore for self-hosted.6566## Deliverable6768Cluster inventory (versions, node pools, add-ons), changes applied with run ids, verification evidence, upgrade notes, rollback path.