mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-17 20:09:43 +00:00
Minor tweaks after 1st NR session
This commit is contained in:
@@ -319,7 +319,7 @@ EOF"
|
||||
curl -fsSL https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.tar.gz |
|
||||
tar -zxf- &&
|
||||
sudo -u docker -H ./krew-linux_amd64 install krew &&
|
||||
echo export PATH=\"/home/docker/.krew/bin:\$PATH\" | sudo -u docker tee -a /home/docker/.bashrc
|
||||
echo export PATH=/home/docker/.krew/bin:\\\$PATH | sudo -u docker tee -a /home/docker/.bashrc
|
||||
fi"
|
||||
|
||||
# Install k9s and popeye
|
||||
|
||||
@@ -92,10 +92,29 @@ Highly recommend!💯)
|
||||
|
||||
---
|
||||
|
||||
class: extra-details
|
||||
|
||||
## Local vs remote
|
||||
|
||||
- Building Go code can be a little bit slow on our modest lab VMs
|
||||
|
||||
- It will typically be *much* faster on a local machine
|
||||
|
||||
- All the demos and labs in this section will run fine either way!
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Preparation
|
||||
|
||||
- Install Go
|
||||
|
||||
(on our VMs: `sudo snap install go --classic`)
|
||||
|
||||
- Install kubebuilder
|
||||
|
||||
([get a release](https://github.com/kubernetes-sigs/kubebuilder/releases/), untar, move the `kubebuilder` binary to the `$PATH`)
|
||||
|
||||
- Initialize our workspace:
|
||||
```bash
|
||||
mkdir useless
|
||||
|
||||
@@ -146,6 +146,22 @@
|
||||
|
||||
---
|
||||
|
||||
class: extra-details
|
||||
|
||||
## Kyverno versions
|
||||
|
||||
- We're going to use version 1.2
|
||||
|
||||
- Version 1.3.0-rc came out in November 2020
|
||||
|
||||
- It introduces a few changes
|
||||
|
||||
(e.g. PolicyViolations are now PolicyReports)
|
||||
|
||||
- Expect this to change in the near future!
|
||||
|
||||
---
|
||||
|
||||
## Installing Kyverno
|
||||
|
||||
- Kyverno can be installed with a (big) YAML manifest
|
||||
@@ -157,7 +173,7 @@
|
||||
- Install Kyverno:
|
||||
```bash
|
||||
kubectl apply -f https://raw.githubusercontent.com/kyverno/kyverno\
|
||||
/master/definitions/release/install.yaml
|
||||
/v1.2.1/definitions/release/install.yaml
|
||||
```
|
||||
|
||||
]
|
||||
@@ -593,6 +609,28 @@ Note: the `apiVersion` field appears to be optional.
|
||||
|
||||
- Policy validation is difficult
|
||||
|
||||
---
|
||||
|
||||
class: extra-details
|
||||
|
||||
## Pods created by controllers
|
||||
|
||||
- When e.g. a ReplicaSet or DaemonSet creates a pod, it "owns" it
|
||||
|
||||
(the ReplicaSet or DaemonSet is listed in the Pod's `.metadata.ownerReferences`)
|
||||
|
||||
- Kyverno treats these Pods differently
|
||||
|
||||
- If my understanding of the code is correct (big *if*):
|
||||
|
||||
- it skips validation for "owned" Pods
|
||||
|
||||
- instead, it validates their controllers
|
||||
|
||||
- this way, Kyverno can report errors on the controller instead of the pod
|
||||
|
||||
- This can be a bit confusing when testing policies on such pods!
|
||||
|
||||
???
|
||||
|
||||
:EN:- Policy Management with Kyverno
|
||||
|
||||
@@ -222,9 +222,9 @@ class: extra-details
|
||||
|
|
||||
[Simple example](https://medium.com/faun/writing-your-first-kubernetes-operator-8f3df4453234)
|
||||
|
||||
- Zalando Kubernetes Operator Pythonic Framework (KOPF)
|
||||
- Kubernetes Operator Pythonic Framework (KOPF)
|
||||
|
||||
[GitHub](https://github.com/zalando-incubator/kopf)
|
||||
[GitHub](https://github.com/nolar/kopf)
|
||||
|
|
||||
[Docs](https://kopf.readthedocs.io/)
|
||||
|
|
||||
@@ -240,6 +240,12 @@ class: extra-details
|
||||
|
|
||||
[Zookeeper example](https://github.com/kudobuilder/frameworks/tree/master/repo/stable/zookeeper)
|
||||
|
||||
- Kubebuilder (Go, very close to the Kubernetes API codebase)
|
||||
|
||||
[GitHub](https://github.com/kubernetes-sigs/kubebuilder)
|
||||
|
|
||||
[Book](https://book.kubebuilder.io/)
|
||||
|
||||
---
|
||||
|
||||
## Validation
|
||||
|
||||
Reference in New Issue
Block a user