Core Concept – 13 %
Configuration – 18 %
Multi-Container Pods – 10 %
Pod Design – 20 %
State Persistent – 8 %
Observability – 18 %
Service and Networking – 13 %
By default RUN creates a deployment
$ kubectl run nginx –image=nginx —> deployment
C:\ovi\docker
λ kubectl run nginx –image=nginx –dry-run -o yaml
$ kubectl run nginx –image=nginx –restart=Never —> pod
$ kubectl run busybox –image=busybox –restart=OnFailure —> job
$ kubectl run busybox –image=busybox –schedule=”* * * * *” –restart=OnFailure —-> cronJob
Secretes
You can generate secretes
$ kubectl create secret generic my-secret –from-literal=ovi=yyy -o yaml –dry-run > ovi-secret.yaml
and now you can create secret with bellow command:
$ kubectl create -f ovi-secret.yaml
Decode-it
*** Jobs and Cronjobs ***
————————–
You can use kubectl get to list and check the status of Jobs.
kubectl get jobs
You can use kubectl get to list and check the status of CronJobs.
kubectl get cronjobs
liveness pod
apiVersion: v1
kind: Pod
metadata:
name: ovi-liveness-pod
spec:
containers:
– name: myapp-container
image: busybox
command: [‘sh’, ‘-c’, “echo Hello, OVI! && sleep 3600”]
livenessProbe:
exec:
command:
– echo
– testing
initialDelaySeconds: 5
periodSeconds: 5