Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dennyzhang committed Nov 9, 2018
1 parent d006f71 commit 8d33607
Show file tree
Hide file tree
Showing 41 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion config/pod-env-metada.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
Expand Down
2 changes: 1 addition & 1 deletion config/pod-environment-var.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
# https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion deployment/deployment-mysql.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
kind: PersistentVolume
apiVersion: v1
metadata:
Expand Down
2 changes: 1 addition & 1 deletion deployment/deployment-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/tutorials/k8s201/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 1 addition & 1 deletion job/job-affinity.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
Binary file modified kubernetes-yaml-templates.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion networksecurity/networksecurity-allowall-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/concepts/services-networking/network-policies/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion networksecurity/networksecurity-complicated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# The egress traffic
# It can only goes to port 5978 of 10.0.0.0/24
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion networksecurity/networksecurity-deny-othernamespaces.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/ahmetb/kubernetes-network-policy-recipes/blob/master/04-deny-traffic-from-other-namespaces.md
# Deny all traffic from other namespaces
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
Expand Down
2 changes: 1 addition & 1 deletion networksecurity/networksecurity-denyall-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/concepts/services-networking/network-policies/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion networksecurity/networksecurity-denyall.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/concepts/services-networking/network-policies/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion networksecurity/networksecurity-denyegress-exceptdns.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://kubernetes.io/blog/2017/10/enforcing-network-policies-in-kubernetes/
# nginx pods only allow ingress traffic from foo pods
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
Expand Down
2 changes: 1 addition & 1 deletion networksecurity/networksecurity-pod.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://kubernetes.io/blog/2017/10/enforcing-network-policies-in-kubernetes/
# nginx pods only allow ingress traffic from foo pods
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
Expand Down
2 changes: 1 addition & 1 deletion networksecurity/networksecurity-port.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/kubernetes/community/blob/2780e1b37cac622b0d622208b246c60bfefd171c/contributors/design-proposals/network/network-policy.md#behavior
# Allow TCP 443 from any source in Bob's namespaces.
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pod/pod-dummy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/dennyzhang/cheatsheet-kubernetes-A4
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pod/pod-gitclone.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://kubernetes.io/docs/tutorials/k8s101/
# https://gist.github.com/tallclair/849601a16cebeee581ef2be50c351841
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pod/pod-handlers.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pod/pod-healthcheck-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/tutorials/k8s201/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pod/pod-hostaliases.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pod/pod-initcontainer-sysctl.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/kubernetes/examples/blob/master/staging/elasticsearch/es-rc.yaml
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pod/pod-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/tutorials/k8s101/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pod/pod-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# kubectl exec secret-test-pod printenv SECRET_PASSWORD
## cleanup
# kubectl delete -f pod-secrets.yaml
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Secret
metadata:
Expand Down
2 changes: 1 addition & 1 deletion podsecurity/podsecurity-advanced.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion podsecurity/podsecurity-enforce.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/kubernetes/examples/blob/master/staging/podsecuritypolicy/rbac/bindings.yaml
# restricted-psp-user grants access to use the restricted PSP.
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
2 changes: 1 addition & 1 deletion podsecurity/podsecurity-privileged.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/kubernetes/examples/blob/master/staging/podsecuritypolicy/rbac/policies.yaml
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion podsecurity/podsecurity-restricted.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/kubernetes/examples/blob/master/staging/podsecuritypolicy/rbac/policies.yaml
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion podsecurity/securitycontext-user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# |  kubectl exec -it security-context-demo -c demo2 -- ls -l /tmp/test.log
# | -rw-r--r-- 1 2000 root 0 Sep 19 16:38 /tmp/test.log
# `-----------
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion quota/limitrange-mem-size.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://hackernoon.com/top-10-kubernetes-tips-and-tricks-27528c2d0222
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: LimitRange
metadata:
Expand Down
2 changes: 1 addition & 1 deletion quota/limitrange-pvc-cumulative-size.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://kubernetes.io/docs/tasks/administer-cluster/limit-storage-consumption/
# In this example, a 6th PVC in the namespace would be rejected because it exceeds the maximum count of 5.
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: ResourceQuota
metadata:
Expand Down
2 changes: 1 addition & 1 deletion quota/limitrange-pvc-size.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://kubernetes.io/docs/tasks/administer-cluster/limit-storage-consumption/
# In this example, a PVC requesting 10Gi of storage would be rejected because it exceeds the 2Gi max.
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: LimitRange
metadata:
Expand Down
2 changes: 1 addition & 1 deletion rbac/serviceaccount-default.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/dennyzhang/cheatsheet-kubernetes-A4
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
Expand Down
2 changes: 1 addition & 1 deletion service/service-cassandra.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/tutorials/stateful-application/cassandra/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Service
metadata:
Expand Down
2 changes: 1 addition & 1 deletion service/service-clusterip-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://kubernetes.io/docs/tutorials/k8s201/
# Default service type: ClusterIP
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Service
metadata:
Expand Down
2 changes: 1 addition & 1 deletion service/service-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/concepts/services-networking/ingress/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
Expand Down
2 changes: 1 addition & 1 deletion statefulset/statefulset-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Service
metadata:
Expand Down
2 changes: 1 addition & 1 deletion statefulset/statefulset-replicated-cassandra.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/tutorials/stateful-application/cassandra/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
2 changes: 1 addition & 1 deletion volume/volume-ebs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/concepts/storage/volumes/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion volume/volume-emptydir.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://kubernetes.io/docs/tutorials/k8s101/
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion volume/volume-manual-pv.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
kind: PersistentVolume
apiVersion: v1
metadata:
Expand Down
2 changes: 1 addition & 1 deletion volume/volume-mount-localpath.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/dennyzhang/dennytest/tree/master/kubernetes/k8s_security
# https://github.com/kubernetes/minikube/blob/master/docs/persistent_volumes.md
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: v1
kind: Pod
metadata:
Expand Down
2 changes: 1 addition & 1 deletion volume/volume-preset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# volume mounts, and environment variables etc into pods at creation time.
# Create a podpreset with volume type of emptydir
# The new PodPreset will act upon any pod that has label role: frontend
# https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-yaml
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
apiVersion: settings.k8s.io/v1alpha1
kind: PodPreset
metadata:
Expand Down

0 comments on commit 8d33607

Please sign in to comment.