kubectl run nginx --image=nginx (deployment)
kubectl run nginx --image=nginx --restart=Never (pod)
kubectl run nginx --image=nginx --restart=OnFailure (job)
kubectl run nginx --image=nginx --restart=OnFailure --schedule"* * * * *" (cronjob)
kubectl run nginx --image=nginx \
--restart=Never --port=80 \
--namespace=myname --command -- serviceaccount=mysql --env=HOSTNAME=local \
--labels=bu=instance,env=dev \
--resquests='cpu=100m,memory=256Mi' --limits='cpu=200m,memory=512Mi'\
--dry-run -o yaml -- /bin/sh -c 'echo hello world'
kubectl run frontend --replicas=2 --labels=run=load-balancer-example --image=busybox --port=8080
kubectl expose deployment frontend --type=NodePort --name=frontend-service --port=6262 --target-port=8080
kubectl set serviceaccount deployment frontend myuser
kubectl create service clusterip my-cs --tcp=5678:8080 --dry-run -o yaml
'k8s > Kubernates' 카테고리의 다른 글
lightning lab 2번 문제 (0) | 2023.11.09 |
---|---|
kubernetes 커맨드 shortcuts (0) | 2023.11.09 |
[CKAD] rewrite-target 옵션 (0) | 2023.11.02 |
[CKAD/Lab] Imperative commands (0) | 2023.09.25 |
[CKAD/Lab] - namespace (0) | 2023.09.24 |