- PDF Link: kubernetes-yaml-templates.pdf
- Blog URL: https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
- Category: kubernetes
File me Issues or star this repo.
See more CheatSheets from Denny: #denny-cheatsheets
Note: for each yaml in below, you can find a related URL at the top.
e.g, here is an example
Yaml | Summary |
---|---|
pod/pod-dummy.yaml | Start a dummy pod with a dead sleep loop |
pod/pod-environment-var.yaml | Start a pod passing environment variables |
pod/pod-secrets.yaml | Pod use secrets as either volumes or environment variables |
pod/pod-nginx.yaml | Start a pod of sample app(nginx) |
pod/pod-healthcheck-nginx.yaml | Start pod with tcp and http healthcheck |
pod/pod-gitclone.yaml | Pod: sidecar with git clone |
pod/pod-hostaliases.yaml | Pod: add alias to /etc/hosts |
pod/pod-handlers.yaml | Pod’s events whenever it get started or stoppped |
Links | link: kubernetes cheatsheet |
Yaml | Summary |
---|---|
volume/volume-manual-pv.yaml | Create pv first, then pvc |
volume/volume-mount-localpath.yaml | Mount local folder to pods |
volume/volume-emptydir.yaml | Create a empty folder, then mount to pods |
statefulset/statefulset-replicated-cassandra.yaml | Use minikube volume |
Links | link: kubernetes cheatsheet |
Yaml | Summary |
---|---|
security/serviceaccount-default.yaml | Serviceaccount: basic usage |
security/podsecurity-no-priviledged.yaml | Pod security: prohibit pod with –privileged |
security/podsecurity-advanced.yaml | Pod security: advanced usage |
Links | link: kubernetes cheatsheet |
Yaml | Summary |
---|---|
security/networksecurity-denyall-ingress.yaml | Allow all ingress |
security/networksecurity-allowall-ingress.yaml | Deny all ingress |
security/networksecurity-denyall.yaml | Deny all ingress and egress |
security/networksecurity-pod.yaml | Whitelist traffic control |
security/networksecurity-complicated.yaml | A comprehensive network policy example |
security/networksecurity-port.yaml | Allow TCP 443 from one namespace |
security/networksecurity-deny-othernamespaces.yaml | Deny all ingress traffic from other namespaces |
security/networksecurity-denyegress-exceptdns.yaml | Deny all egress traffic except DNS |
Links | link: kubernetes cheatsheet |
Links | GitHub: kubernetes-network-policy-recipes |
Yaml | Summary |
---|---|
quota/limitrange-pvc-size.yaml | LimitRange: PVC size |
quota/limitrange-pvc-cumulative-size.yaml | ResourceQuota: pvc count and storage size |
Links | link: kubernetes cheatsheet |
Yaml | Summary |
---|---|
deployment/deployment-nginx.yaml | Deploy nginx with 2 replicas |
deployment/deployment-mysql.yaml | Deploy mysql |
Links | link: kubernetes cheatsheet |
Yaml | Summary |
---|---|
statefulset/statefulset-nginx.yaml | Statefulset: nginx |
statefulset/statefulset-single-mysql | Statefulset: mysql |
statefulset/statefulset-replicated-cassandra.yaml | Statefulset: single cassandra |
statefulset/statefulset-replicated-mysql | Statefulset: cassandra with replicas |
Links | link: kubernetes cheatsheet |
Yaml | Summary |
---|---|
service/service-clusterip-nginx.yaml | Service: nginx with clusterip |
service/service-cassandra.yaml | Service: cassandra |
Links | link: kubernetes cheatsheet |
License: Code is licensed under MIT License.