GoConqr has a new look! Let us know what you think.

Mind map

K8s creation

Cassandra Haw English

Map content

K8s creation

  1. '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
  2. 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
  3. CREATE SERVICE - STANDALONE EXPOSE

    • --type='': Type for this service: ClusterIP, NodePort, LoadBalancer, or ExternalName. Default is 'ClusterIP'
    • --port=''
      • --target-port defaults to port
  4. JOB / CRONJOB

    • kubectl create cronjob test-job --image=busybox
      • --schedule="*/1 * * * *"
        • -- touch cronjob-ran.txt
      • JOB DOESNT HAVE --schedule
  5. STATIC POD

    • Choose path - kubectl run --restart=Never > /choosenpath/yaml
      • /etc/systemd/system/kubelet.service
        • "--pod-manifest-path=/choosenpath/
          • sudo systemctl daemon-reload
  6. 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
  7. 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

Information

Description
Mind Map on K8s creation, created by Cassandra Haw on 12/02/2020.
Created by
Cassandra Haw
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?