1
July, 2023
Luxembourg
Agenda
2
About us
3
|
|
|
|
|
|
|
Shuting Zhao |
Vishal Choudhary
Why policies?
The rise of Kubernetes platforms
5
96% of enterprises are using or evaluating Kubernetes – CNCF survey
The cost of missing Kubernetes guardrails
Confidential
6
Phase | Pre-deploy | Production |
Cost per defect | $25 | $15,903 |
Cost per cluster | $8151 | $5,216,193 |
https://www.cncf.io/blog/2022/02/02/the-cost-of-a-kubernetes-repair-in-development-vs-production/
average # of misconfigurations per cluster
328
average # of workloads per cluster
110
average # of findings per workload
3
7
Policies are a contract
Developers
Security
Operations
What policies provide
8
Why Kyverno?
Kyverno is the Kubernetes native policy engine
10
PAGE 10
CNCF project created and maintained by Nirmata
Why Kyverno?
11
Kyverno simplifies K8s policy management!
CNCF Policy Engines: Kyverno or OPA?
Confidential
12
Kyverno | OPA / Gatekeeper |
Kubernetes-native | General purpose rules engine |
Policies are declarative Kubernetes resources | Custom DSL (Rego) built for authorization |
Validation | Validation |
Mutation | -- |
Generation | -- |
Image Verification | -- |
Native CNCF standardized reporting | -- |
Use GitOps and other Kubernetes tools | -- |
Higher performance with lower resources | -- |
“Thank you all for Kyverno, It made K8s policy really easy, I struggled for months with OPA/Gatekeeper, I am glad I found Kyverno.” – GKE admin on community forums
Kubernetes Policy Management Tools Compared �OPA with Gatekeeper vs. Kyverno -- by Viktor Farcic
�
Top Use Cases
Kyverno Policy Management Use Cases
15
SecOps | DevOps | FinOps |
|
|
|
Admission Control & Background Scans
Command Line Checks
In-cluster
CI/CD pipelines
Top Use Cases
How Kyverno Policies Work
Kyverno Architecture
17
A Kyverno Policy
18
A Kyverno Policy
19
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: require-labels
spec:
validationFailureAction: Enforce
background: true
rules:
- name: require-team
match:
any:
- resources:
kinds:
- Pod
validate:
message: 'The label `team` is required.'
pattern:
metadata:
labels:
team: '?*'
Validate Policy
20
Mutate Policy
21
Generate Policy
22
Image Verification Policy
23
Cleanup policies
Demos
�Additional Features
Additional Features
27
Summary
Key Takeaways
29
Join the Kyverno Community
30
Get Kyverno Certified!
Thanks!
https://kyverno.io
Q & A
https://kyverno.io