private:arie:k8
Differences
This shows you the differences between two versions of the page.
| private:arie:k8 [2024/12/24 16:17] – created arie | private:arie:k8 [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== k8 notes of Arie ====== | ||
| - | < | ||
| - | #Bash into container | ||
| - | k exec -it wiki-dokuwiki-9f9fd859d-2wfx6 bash | ||
| - | |||
| - | kush wiki-dokuwiki | ||
| - | |||
| - | # fetch chart to analyse values.yaml | ||
| - | helm fetch gitlab/ | ||
| - | |||
| - | # debug certs | ||
| - | kug orders, | ||
| - | |||
| - | # Delete PV that has finalizers | ||
| - | pv=pvc-daec7eed-fc8e-4281-a15b-6b370df54804 | ||
| - | echo ' | ||
| - | # Delete POD that got stuck (and no finalizers to delete) | ||
| - | kubectl delete pods fluent-bit-xczr2 --grace-period=0 --force | ||
| - | |||
| - | #copy file into pod | ||
| - | kubectl cp / | ||
| - | |||
| - | # Delete namespace that got stuck | ||
| - | namespaceToDelete=brocha | ||
| - | kubectl get namespace " | ||
| - | jq ' | ||
| - | | ||
| - | |||
| - | # drain and evict pods from a node | ||
| - | kubectl drain --ignore-daemonsets --delete-emptydir-data k8i03 | ||
| - | #untaint | ||
| - | kubectl uncordon k8i03 | ||
| - | |||
| - | # port forwarding of localport 40090 to port 9090 of the svc | ||
| - | kubectl port-forward -n monitoring svc/ | ||
| - | |||
| - | # see nodes labels | ||
| - | kug nodes --show-labels | ||
| - | # remove label worker from a node: | ||
| - | kubectl label node ip-10-0-7-187.ec2.internal worker- | ||
| - | # add control-plane label | ||
| - | kubectl label node k8r05 node-role.kubernetes.io/ | ||
| - | kubectl label node k8p01 general=yes | ||
| - | |||
| - | # See cpu/mem usage by nodes | ||
| - | kubectl top node | ||
| - | |||
| - | # Show pod by label | ||
| - | kug pod -n monitoring -l app.kubernetes.io/ | ||
| - | # kill pods by label | ||
| - | kudel pod -n nqa -l app=etljobs-sel | ||
| - | |||
| - | # watch hpa of gwpa@rnd | ||
| - | kug hpa -n rnd gwpa-hpa --watch | ||
| - | |||
| - | # events on API of prod2 farm | ||
| - | kug events -n prod2 | ||
| - | </ | ||
private/arie/k8.1735057040.txt.gz · Last modified: 2024/12/31 08:55 (external edit)
