This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
automatizace:kubernetes [2022/02/18 16:41] tomas [Kubectl] |
automatizace:kubernetes [2022/08/30 16:47] tomas |
||
---|---|---|---|
Line 48: | Line 48: | ||
kubectl config set-context --current --namespace=NS ... nastavi vychozi namespace\\ | kubectl config set-context --current --namespace=NS ... nastavi vychozi namespace\\ | ||
+ | =====nodes===== | ||
kubectl get nodes ... Seznam nodu\\ | kubectl get nodes ... Seznam nodu\\ | ||
+ | |||
+ | =====pods===== | ||
+ | kubectl get pods\\ | ||
+ | kubectl describe pod aaaa -n nnnn ... podrobne informace o podu\\ | ||
kubectl get pod, | kubectl get pod, | ||
kubectl describe replicaset.extensions/ | kubectl describe replicaset.extensions/ | ||
Line 63: | Line 68: | ||
kubectl scale deployment sftp-la-service --replicas=1 -n default ... skalovani\\ | kubectl scale deployment sftp-la-service --replicas=1 -n default ... skalovani\\ | ||
+ | kubectl get service azure-vote-front --watch ... Sledovani ap\\ | ||
+ | |||
+ | |||
+ | ==secrets== | ||
kubectl get secrets\\ | kubectl get secrets\\ | ||
kubectl create secret generic secret1 -from-literal=username=devuser\\ | kubectl create secret generic secret1 -from-literal=username=devuser\\ | ||
kubectl describe secrets/ | kubectl describe secrets/ | ||
kubectl delete secret secret1\\ | kubectl delete secret secret1\\ | ||
- | + | kubectl get secret client.crt | |
- | kubectl get service azure-vote-front | + | |
==Ubuntu container for debugging== | ==Ubuntu container for debugging== | ||
Line 90: | Line 98: | ||
kubectl exec -it ubuntu %%--%% /bin/bash ... stahne a spusti ubuntu a na nem bash\\ | kubectl exec -it ubuntu %%--%% /bin/bash ... stahne a spusti ubuntu a na nem bash\\ | ||
- | ==network | + | ==network |
- | kubectl get networkpolicy -n namespace | + | kubectl get networkpolicy -n namespace |
- | kubectl delete networkpolicy default-deny-all -n namespace | + | kubectl describe networkpolicy Policy1 -n namespace ... popis sitovych pravidel\\ |
+ | kubectl edit netpol access-nginx -n default ... editace sitovych pravidel\\ | ||
+ | KUBE_EDITOR=' | ||
+ | kubectl delete networkpolicy default-deny-all -n namespace | ||
+ | |||
+ | ==Ukoly== | ||
+ | kubectl get cronjob ... ukaze plany ukolu\\ | ||
+ | kubectl get job --watch ... sledovani jednotlivych jobu/ | ||
+ | kubectl describe job JOBID ... informace o jobu, na kterem kontejneru byl spusteny atd.\\ | ||
+ | ==certifikaty== | ||
+ | kubectl get certificate ... seznam spravovanych certifikatu\\ | ||
+ | kubectl describe certificate AAA ... popis certifikatu AAA\\ |