-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate.sh
executable file
·46 lines (36 loc) · 2.38 KB
/
generate.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /bin/sh
cluster_name=minikube
generate_kar()
{
../../bin/kube-diagrams -v -c KubeDiagrams.yml $@
}
# Get all Kubernetes resources.
kubectl get clusterrole,clusterrolebinding,crd,configmap,ds,deployment,hpa,ingress,ingressclass,job,node,pod,replicaset,role,rolebinding,secret,service,serviceaccount,storageclass,namespace -A -o=yaml > ${cluster_name}.yml
# Generate Kubernetes architecture diagram.
generate_kar ${cluster_name}.yml
# Get all RBAC-related Kubernetes resources.
kubectl get clusterrole,clusterrolebinding,role,rolebinding,serviceaccount -A -o=yaml > ${cluster_name}-rbac.yml
# Generate Kubernetes architecture diagram.
generate_kar ${cluster_name}-rbac.yml
# Get all Kubernetes resources except for rbac ones.
kubectl get crd,configmap,ds,deployment,hpa,ingress,ingressclass,job,node,pod,replicaset,secret,service,serviceaccount,storageclass,namespace -A -o=yaml > ${cluster_name}-without-rbac.yml
# Generate Kubernetes architecture diagram.
generate_kar ${cluster_name}-without-rbac.yml
# Generate a Kubernetes architecture diagram from a corrected manifest.
generate_kar ${cluster_name}-without-rbac-corrected.yml
# Get all Kubernetes resources in the default namespace.
kubectl get configmap,ds,deployment,hpa,ingress,job,pod,replicaset,role,rolebinding,secret,service,serviceaccount -o=yaml > ${cluster_name}-default.yml
# Generate Kubernetes architecture diagram.
generate_kar ${cluster_name}-default.yml
# Get all Kubernetes resources in the kubernetes-dashboard namespace.
kubectl get configmap,ds,deployment,hpa,ingress,job,pod,replicaset,role,rolebinding,secret,service,serviceaccount -n kubernetes-dashboard -o=yaml > ${cluster_name}-dashboard.yml
# Generate Kubernetes architecture diagram.
generate_kar ${cluster_name}-dashboard.yml
# Get all Kubernetes resources in the ingress-nginx namespace.
kubectl get configmap,ds,deployment,hpa,ingress,ingressclass,job,pod,replicaset,role,rolebinding,secret,service,serviceaccount -n ingress-nginx -o=yaml > ${cluster_name}-ingress-nginx.yml
# Generate Kubernetes architecture diagram.
generate_kar ${cluster_name}-ingress-nginx.yml
# Get all Kubernetes resources in the kube-system namespace.
kubectl get configmap,ds,deployment,hpa,ingress,job,pod,replicaset,role,rolebinding,secret,service,serviceaccount -n kube-system -o=yaml > ${cluster_name}-kube-system.yml
# Generate Kubernetes architecture diagram.
generate_kar ${cluster_name}-kube-system.yml