명령형 및 선언적 사용 POD 생성하기. kubectl run nginx-pod --image=nginx:alpine pod/nginx-pod created kubectl get pods NAME READY STATUS RESTARTS AGE nginx-pod 1/1 Running 0 92s 매니페스트 생성하기. kubectl run redis --image=redis:alpine --dry-run=client -o yaml apiVersion: v1 kind: Pod metadata: creationTimestamp: null labels: run: redis name: redis spec: containers: - image: redis:alpine name: redis resources: {} dn..
Taint and Toleration Node 목록 보기 kubectl get nodes NAME STATUS ROLES AGE VERSION controlplane Ready master 119s v1.19.0 node01 Ready 86s v1.19.0 Node 목록 상세 kubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME controlplane Ready master 3m1s v1.19.0 172.17.0.8 Ubuntu 18.04.5 LTS 4.15.0-122-generic docker://19.3.13 node01 Ready 2m2..
Node 의 Label 검사하기. kubectl describe nodes node01 | grep -A10 Labels Labels: beta.kubernetes.io/arch=amd64 beta.kubernetes.io/os=linux kubernetes.io/arch=amd64 kubernetes.io/hostname=node01 kubernetes.io/os=linux Node Label 목록만 보기 kubectl get nodes node01 --show-labels Node Label 추가힉. kubectl label node node01 color=blue node/node01 labeled kubectl describe nodes node01 | grep -A10 Labels Labels:..
Resource Limit 실습 Resource CPU 1(1000m) : CPU 1개를 fully 사용하는것 250m: CPU 1개를 1/4 만큼 사용하는것 Resource Memory 1G (Gigabyte) = 1,000,000,000 bytes 1M (Megabyte) = 1,000,000 bytes 1K (Kilobyte) = 1,000 bytes 1Gi (Gibibyte) = 1,073,741,824 bytes 1Mi (Mebibyte) = 1,048,576 bytes 1Ki (Kibibyte) = 1,024 bytes Resource 설정관련 CPU 의 경우 Limit 를 일시적으로 넘어갈 수 있음, POD 의 실행에 큰 영향을 주지 않음 Memory 의 경우 Limit 를 넘어서면 OOMK..
DaemonSet 실습 DaemonSet 확인하기. kubectl get daemonsets No resources found in default namespace. 전체 Namespace 에서 Daemonset 조회하기. kubectl get daemonsets --all-namespaces NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE kube-system kube-flannel-ds-amd64 2 2 2 2 2 62m kube-system kube-flannel-ds-arm 0 0 0 0 0 62m kube-system kube-flannel-ds-arm64 0 0 0 0 0 62m kube-system kub..
ConfigMap 실습 POD 환경변수 살펴보기. kubectl describe pod test-pod ... 생략 Containers: webapp-color: Container ID: docker://58f186937c77a6a32da6e830b214d7f25850bfaeab8e91aa952c43cb26cb2cf4 Image: kodekloud/webapp-color Image ID: docker-pullable://webapp-color@sha256:99c3821651452e7675af243485034a72eb1423 Port: Host Port: State: Running Started: Tue, 23 Mar 2021 07:01:03 +0000 Ready: True Restart Count: 0 ..
Secret 실습 Secret 조회하기. kubectl get secrets NAME TYPE DATA AGE default-token-8k111 kubernetes.io/service-account-token 3 35m Secret 상세 조회하기. kubectl describe secrets default-token-8kx8z Name: default-token-8kx8z Namespace: default Labels: Annotations: kubernetes.io/service-account.name: default kubernetes.io/service-account.uid: 637836b0-5738-491f-9886-04e4ce00b2b4 Type: kubernetes.io/service-acc..
Node Cordon, Drain Node 살펴보기. kubectl get nodes pod 목록 보기. kubectl get pods -o wide Cordon cordon 은 특정 node 에 스케줄 되지 않도록 한다. kubectl cordon node01 Drain drain 은 cordon 처럼 pod가 특정 노드로 스케줄 되지 않도록 하며, 또한 해당 노드에서 수행중인 pod 를 다른 pod로 이주 시키는 역할을 한다. kubectl drain node01 --ignore-daemonsets 위와 같이 수행되는 경우 ReplicaSet 이나 ReplicaController 에 의해서 관리되는 pod 는 자동으로 다른 node로 스케줄링이 수행이 된다. 그러나 단일 pod 로 수행중인 pod 가..
- Total
- Today
- Yesterday
- jenkins
- go
- declative
- mongo
- java
- argocd
- CI
- NodeSelector
- jpa
- tfsec
- Spring
- deploy
- D3
- Database
- AWS
- gitops
- springboot
- docker-compose
- kafka-springboot
- Golang
- CD
- mapping
- docker
- MySQL
- Kafka
- Gorilla
- kubernetes
- Terraform
- MongoDB
- kubectl
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |