0-Home
Github
TraceMyPodsOfficial
TMP-docs
PSP
Image Restriction.yaml

Documentation

apiVersion: kyverno.io/v1 kind: ClusterPolicy metadata: name: restrict-image-registries spec: validationFailureAction: enforce background: true rules:

  • name: allow-only-approved-registries match: resources: kinds:
    • Pod validate: message: "Images must be from approved registries: ghcr.io, docker.io, your-registry.com." pattern: spec: containers:
      • image: "ghcr.io/* | docker.io/* | your-registry.com/*"

💬 Need a Quick Summary?

Hey! Don't have time to read everything? I get it. 😊
Click below and I'll give you the main points and what matters most on this page.
Takes about 5 seconds • Uses Perplexity AI