...
Info | ||
---|---|---|
| ||
|
Apple M2 에서 kubectl command 자동완성 및 alias k를 설정 하고 싶어.
Code Block |
---|
$ vi ~/.zshrc
autoload -Uz compinit
compinit
source <(kubectl completion zsh)
compdef __start_kubectl k
alias k=kubectl
$ source ~/.zshrc |
CronJob을 수동 실행 하고 싶어요.
Code Block |
---|
kubectl create job --from=cronjob/kubernetes-cron-job manual-cron-job |
Secret Password를 인코딩 할래요.
Code Block |
---|
echo -n '{PASSWORD}' | base64 |
Network 점검 할 수 있는 Pod가 필요해요.
Info | ||||
---|---|---|---|---|
| ||||
|
모든 Pod(Deployment)의 ResourceQuate설정 정보를 보고 싶어요.
Code Block |
---|
kubectl get deploy -o=custom-columns="Name:.metadata.name,CPU-Limit:.spec.template.spec.containers[*].resources.limits.cpu,Memory-Limit:.spec.template.spec.containers[*].resources.limits.memory" ------------------------------------------------ Name CPU-Limit Memory-Limit admin-auth 500m 2Gi admin-batch 1 2Gi admin-bff 500m 2Gi admin-gw 500m 2Gi admin-web 500m 2Gi |
Node별 리소스사용량을 보고 싶어요.
Code Block |
---|
kubectl describe node | grep -A7 Resource ------------------------------------------------- Resource Requests Limits -------- -------- ------ cpu 6450m (82%) 6750m (86%) memory 10590Mi (38%) 10790Mi (38%) ephemeral-storage 0 (0%) 0 (0%) hugepages-1Gi 0 (0%) 0 (0%) hugepages-2Mi 0 (0%) 0 (0%) attachable-volumes-azure-disk 0 0 -- Resource Requests Limits -------- -------- ------ cpu 6050m (77%) 6250m (79%) memory 8632Mi (31%) 8742Mi (31%) ephemeral-storage 0 (0%) 0 (0%) hugepages-1Gi 0 (0%) 0 (0%) hugepages-2Mi 0 (0%) 0 (0%) attachable-volumes-azure-disk 0 0 |
...