This repository contains the commands and examples used in our talk at DevOps Experience.
Creating a k8s cluster with Kind
The command below creates a k8s cluster on version 1.27.2
with Kind.
kind create cluster --config kind-config.yaml
The kind-config.yaml
configuration file enables the feature gate ValidatingAdmissionPolicy
.
The following commands creates validating admission policies and their bindings.
kubectl apply -f vap/replicas.yaml
kubectl apply -f vap/labels.yaml
See the k8s official documentation for more details.
The file deployment.yaml
is an example of a k8s Deployment
and you can use it for tests.
Edit the file for your tests, such as increasing replicas and adding labels.
kubectl apply -f deployment.yaml
Scanning the cluster with Marvin
Since you have Marvin installed, you can scan a cluster by the following command.
marvin scan -f checks/ --disable-builtin
This command uses the custom checks from the checks/
directory.
Visit the Marvin repository for in-depth information.