aws/k8s, eks study

K8s command examples

gepp 2022. 6. 14. 17:16

Create and run a particular image

kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...]

 

Create a namespace called 'dev' and a pod with image nginx called p on the namespace:

kubectl create namespace dev
kubectl run p --image=nginx --restart=Never -n dev