Skip to content

Kyverno Policy As Code Using CDK8S

Posted on:November 19, 2022Β atΒ 03:57 PM

image

Abstract

Table Of Contents

Open Table Of Contents

πŸš€ Pre-requisite

πŸš€ Overview of Kyverno

πŸš€ Import Kyverno CRDs

⚑ $ cdk8s import https://raw.githubusercontent.com/kyverno/kyverno/main/config/crds/kyverno.io_clusterpolicies.yaml --output src/imports/
Importing resources, this may take a few moments...
kyverno.io
  kyverno.io/clusterpolicy

πŸš€ Write code

πŸš€ Build Kyverno policy from code

πŸš€ Apply and test

πŸš€ Test Restart Deployment On Configmap Change

πŸš€ Conclusion