Skip to content

Commit

Permalink
Update __lab.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lerndevops authored May 8, 2020
1 parent 24bc50f commit 97a58f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pods/__lab.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ kubectl delete pod <pod-name> --grace-period=0 --force # delete pod forcefully


### Imperative commands to generate yaml files

```
kubectl run nginx --image=nginx --dry-run=client -o yaml ## generate pod yaml file
kubectl run nginx --image=nginx --restart=Never --dry-run=client -o yaml ## generate pod yaml file with restartPolicy: Never
kubectl run nginx --image=nginx -l="app=web,env=dev" --dry-run=client -o yaml ## generate pod yaml file with labels provided
kubectl run nginx --image=nginx --env="hello=world" --env="me=naresh" --dry-run=client -o yaml ## generate pod yaml with env variables
kubectl run nginx --image=nginx --restart=OnFailure --env='hello=world' -l='app=web' --limits='cpu=100m,memory=150Mi' --dry-run=client -o yaml ## generate pod yaml with various parametes
kubectl run nginx --image=nginx --port=80 --expose --dry-run=client -o yaml ## generate pod yaml file & Service yaml file together
```

0 comments on commit 97a58f8

Please sign in to comment.