Skip to content

Instantly share code, notes, and snippets.

@zahlenhelfer
zahlenhelfer / kyverno-cis-52234.yaml
Created May 5, 2026 07:46
Kyverno CIS 5.2.2/5.2.3/5.2.4 Benchmark Policy
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: cis-5-2-pod-security
annotations:
policies.kyverno.io/title: "CIS Kubernetes Benchmark 5.2"
policies.kyverno.io/description: >-
CIS 5.2.2: Do not admit privileged containers
CIS 5.2.3: Do not admit containers with hostPID
CIS 5.2.4: Do not admit containers with hostIPC
@zahlenhelfer
zahlenhelfer / cluster-cleanup-deployments.yaml
Last active July 8, 2025 12:43
Kyverno Policy - cleandeploy
apiVersion: v1
kind: Pod
metadata:
labels:
cleanup.kyverno.io/ttl: 24h
name: foo
spec:
containers:
image: busybox:1.35
name: foo
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: generate-default-network-policy
annotations:
policies.kyverno.io/title: Generate Default Network Policy
policies.kyverno.io/category: Multi-Tenancy
policies.kyverno.io/severity: medium
policies.kyverno.io/description: >-
This policy automatically generates a default NetworkPolicy in each namespace.
@zahlenhelfer
zahlenhelfer / 01-steps.md
Created March 9, 2022 17:18 — forked from arun-gupta/01-steps.md
Kubernetes and Fargate

Create Amazon EKS Cluster

eksctl create cluster --name fargate --region us-east-1 --version 1.14 --fargate
[ℹ]  eksctl version 0.11.1
[ℹ]  using region us-east-1
[ℹ]  setting availability zones to [us-east-1c us-east-1d]
[ℹ]  subnets for us-east-1c - public:192.168.0.0/19 private:192.168.64.0/19
[ℹ]  subnets for us-east-1d - public:192.168.32.0/19 private:192.168.96.0/19
[ℹ]  using Kubernetes version 1.14
@zahlenhelfer
zahlenhelfer / stress.sh
Created June 4, 2020 14:42 — forked from mikepfeiffer/stress.sh
Install Stress Utility on Amazon Linux 2
sudo amazon-linux-extras install epel -y
sudo yum install stress -y
@zahlenhelfer
zahlenhelfer / vagrantfile
Created August 14, 2019 08:58
Virtualbox Vagrant File for K8s
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
@zahlenhelfer
zahlenhelfer / _README.md
Created March 1, 2019 18:01 — forked from schickling/_README.md
Script to import and export docker-machine configurations to sync between hosts/collaborators

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1
@zahlenhelfer
zahlenhelfer / nfs-server.yaml
Created February 8, 2019 20:55 — forked from matthewpalmer/nfs-server.yaml
Example for NFS server in Kubernetes
# Note - an NFS server isn't really a Kubernetes
# concept. We're just creating it in Kubernetes
# for illustration and convenience. In practice,
# it might be run in some other system.
# Create a service to expose the NFS server
# to pods inside the cluster.
kind: Service
apiVersion: v1
@zahlenhelfer
zahlenhelfer / app.component.html
Created February 1, 2019 12:20
Angular - i18n - Locale
<td>{{book.price | currency:'EUR':'symbol':'1.2-2':'de-DE'}}</td>
@zahlenhelfer
zahlenhelfer / kuard-pod.yaml
Created January 22, 2019 19:08
K8s - Übung 2 - Pod-Manifest
apiVersion: v1
kind: Pod
metadata:
name: kuard
spec:
containers:
- image: gcr.io/kuar-demo/kuard-amd64:1
name: kuard
ports:
- containerPort: 8080