kubectl config use-context cluster1-admin@cluster1
k create ns web-ns
k run nginx1233 --namespace web-ns --image nginx --dry-run=client -o yaml > 12.yaml
Edit manifest by configuring liveness probes
# vim 12.yaml
apiVersion: v1
kind: Pod
metadata:
labels:
run: nginx1233
name: nginx1233
namespace: web-ns
spec:
containers:
- image: nginx
name: nginx1233
livenessProbe:
exec:
command:
- ls
- /var/www/html/
initialDelaySeconds: 10
periodSeconds: 60
k apply -f 12.yaml