Mapa mental
K8s creation
Conteúdo do mapa
K8s creation
'kubectl run'
- POD = --restart=Never
- DEPLOY --restart=Always
- Expose/Service --expose=true --port=80
- Labels -l="run=cassie,test=cka"
- COMMAND --sleep || --sh -c "echo 'chained'; echo command > .txt "
- --limits and --request="memory=100Mi"
- ALSO SET THE CONT PORT
- Labels -l="run=cassie,test=cka"
- Expose/Service --expose=true --port=80
CREATE
- NAMESPACE kubectl create namespace {name}
- SECRET kubectl create secret generic mysecretname --from-literal=username=superadmin --from-literal=password=password
- DaemonSet : kubectl create deploy nginx --image=nginx --dry-run -o yaml > nginx-ds.yaml - Then edit yaml and remove replica=1 and update Now replace the line kind: Deployment with to kind: DaemonSet
CREATE SERVICE - STANDALONE EXPOSE
- --type='': Type for this service: ClusterIP, NodePort, LoadBalancer, or ExternalName. Default is 'ClusterIP'
- --port=''
- --target-port defaults to port
JOB / CRONJOB
- kubectl create cronjob test-job --image=busybox
- --schedule="*/1 * * * *"
- -- touch cronjob-ran.txt
- JOB DOESNT HAVE --schedule
- --schedule="*/1 * * * *"
- kubectl create cronjob test-job --image=busybox
STATIC POD
- Choose path - kubectl run --restart=Never > /choosenpath/yaml
- /etc/systemd/system/kubelet.service
- "--pod-manifest-path=/choosenpath/
- sudo systemctl daemon-reload
- "--pod-manifest-path=/choosenpath/
- /etc/systemd/system/kubelet.service
- Choose path - kubectl run --restart=Never > /choosenpath/yaml
CONFIGMAP
- kubectl create configmap test -o yaml --dry-run --from-literal="date=hello.cassie" > cmap.yaml
- envFrom: - configMapRef: name: special-config
- --from-file file.txt
- kubectl create configmap test -o yaml --dry-run --from-literal="date=hello.cassie" > cmap.yaml
CREATE PV
- https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume
- CREATE PVC
- https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolumeclaim
- CLAIM PV
- https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-pod
- CLAIM PV
- https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolumeclaim
- CREATE PVC
- https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume
Informações
- Descrição
- Mapa Mental sobre K8s creation, criado por Cassandra Haw em 12-02-2020.
- Criado por
- Cassandra Haw
- Visualizações
- 1
- Avaliação