Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

Hoofdstuk 7Naam in de cursus: ML platforms on Kubernetes

Run AI workloads on Kubernetes

The skills of the whole path come together here: Kubernetes (CKA), security (CKS), GitOps (GitOps) — now for GPU training jobs, notebooks, pipelines and model servers. This is the daily work of an AI infrastructure engineer.

  • 5 Lessen
  • 3 Commando's

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

$ als gewone gebruiker# als root (of met sudo)

7.1

Give pods GPUs

The NVIDIA device plugin (or the GPU Operator) makes GPUs a schedulable resource: nvidia.com/gpu.

helm install gpu-operator nvidia/gpu-operator -n gpu-operator --create-namespace
kubectl describe node gpu1 | grep nvidia.com/gpu
gpu-job.yaml
apiVersion: batch/v1
kind: Job
metadata: { name: train-gpu, namespace: ml }
spec:
  template:
    spec:
      restartPolicy: Never
      tolerations: [{ key: nvidia.com/gpu, operator: Exists, effect: NoSchedule }]
      containers:
        - name: train
          image: ghcr.io/s0sta/train:1.2
          resources:
            limits: { nvidia.com/gpu: 1, memory: 16Gi }

Op het werk

Taint GPU nodes so only GPU jobs land there — GPUs are expensive to leave idle or to fill with web pods.

7.2

Know Kubeflow

Kubeflow is a set of ML tools on Kubernetes.

PartJob
NotebooksJupyter servers per user, with GPUs
PipelinesTraining pipelines as containers
KatibHyperparameter tuning
Training OperatorDistributed training (PyTorch, TensorFlow)
KServeModel serving

7.3

Share the cluster fairly

Many teams, few GPUs: use namespaces, quotas and queues.

  • One namespace per team with a ResourceQuota on requests.nvidia.com/gpu.
  • Priority classes: production inference above training above experiments.
  • Batch queues (Kueue) start jobs when GPUs are free.
gpu-quota.yaml
apiVersion: v1
kind: ResourceQuota
metadata: { name: gpu, namespace: team-a }
spec:
  hard:
    requests.nvidia.com/gpu: "2"

7.4

Secure the ML platform

The same controls as any platform, plus data protection.

  • Pod Security restricted for notebooks and jobs where possible; no privileged GPU pods for users.
  • NetworkPolicies: training jobs reach only the data store and the registry.
  • Workload identity (no keys in notebooks) to read data from cloud storage.
  • Signed images and models; scan large base images (CUDA images have many packages).
  • Audit who downloaded which model and dataset.

7.5

Plan your first MLOps project

The year-2 portfolio project (see the path).

  1. A small model trained by a nightly pipeline, tracked in MLflow.
  2. A FastAPI model server image, scanned and signed in CI.
  3. Deployed on the home cluster with Argo CD; canary for new versions.
  4. Prometheus metrics, a Grafana dashboard and a drift report.

Alle commando's in dit hoofdstuk