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: Container runtime sandboxes and pod-to-pod encryption

Isolate workloads with sandboxes and mTLS

Normal containers share the host kernel. For untrusted code, a sandboxed runtime (gVisor, Kata Containers) adds a second barrier. Between pods, mTLS (mutual TLS) encrypts traffic and proves who is talking.

  • 4 Lessen
  • 3 Commando's

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

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

Vaardigheden in dit hoofdstuk

  • Sandbox-runtimes en versleuteling tussen pods

7.1

Use a sandboxed runtime with RuntimeClass

A RuntimeClass names a runtime handler configured in containerd (for example runsc for gVisor). Pods choose it with runtimeClassName.

runtimeclass.yaml
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata: { name: gvisor }
handler: runsc
---
apiVersion: v1
kind: Pod
metadata: { name: untrusted, namespace: shop }
spec:
  runtimeClassName: gvisor
  containers:
    - name: app
      image: nginx:1.27
kubectl apply -f runtimeclass.yaml
kubectl exec untrusted -n shop -- dmesg | head -2
[    0.000000] Starting gVisor...
kubectl get runtimeclass
SandboxHow it isolates
gVisor (runsc)A user-space kernel catches system calls
Kata ContainersEvery pod in a small virtual machine

Onthoud

The handler (runsc) must be installed and configured in containerd on the node — the RuntimeClass object alone does nothing.

7.2

Know where sandboxes help

Sandboxes cost some speed and compatibility. Use them where the risk is high.

  • Code from customers or the internet (CI runners, online code playgrounds).
  • Multi-tenant clusters with teams that do not trust each other.
  • Workloads that parse untrusted files (image or document converters).

7.3

Encrypt pod-to-pod traffic with mTLS

With mutual TLS, both sides show a certificate — traffic is encrypted and both identities are proven. A service mesh or the CNI does it without changing the app.

OptionHow
Istio (sidecar or ambient)PeerAuthentication with mode: STRICT
LinkerdmTLS on by default for meshed pods
CiliumTransparent encryption (WireGuard/IPsec) and mutual authentication
istio-strict.yaml
apiVersion: security.istio.io/v1
kind: PeerAuthentication
metadata: { name: default, namespace: shop }
spec:
  mtls:
    mode: STRICT

7.4

Encrypt node-to-node traffic

The CNI can encrypt all pod traffic between nodes, for example Cilium with WireGuard.

cilium install --set encryption.enabled=true --set encryption.type=wireguard
cilium status | grep Encryption

Commando's in deze les

Alle commando's in dit hoofdstuk