Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse

Table of Contents

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
iconfalse
Code Block
kubectl run nettools --image=jrecord/nettools -- sleep 48000
Code Block
apiVersion: v1
kind: Pod
metadata:
  name: nettools
  namespace: default
spec:
  containers:
  - name: nettools
    image: jrecord/nettools:latest
    command:
      - sleep
      - "48000"
    imagePullPolicy: IfNotPresent
  restartPolicy: Never

모든 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

...