본문 바로가기

POD4

Kubernetes - StatefulSet StatefulSet 정의 Pod의 상태를 유지해주는 컨트롤러 Pod 이름 Pod의 볼륨(스토리지) 생성 root@master:~# cat > sf-nginx.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: sf-nginx spec: replicas: 3 serviceName: df-nginx-service podManagementPolicy: Parallel selector: matchLabels: app: webui template: metadata: name: nginx-pod labels: app: webui spec: containers: - name: nginx-container image: nginx:1.14 root@master:~#.. 2021. 11. 22.
Kubernetes - pod resource 요청 및 제한 pod resource 요청 및 제한 Resource Requests 파드를 실행하기 위한 최소 리소스 양을 요청 Resource Limits 파드가 사용할 수 있는 최대 리소스 양을 제한 Memory limit을 초과해서 사용되는 파드는 종료 (OOM Kill)되며 다시 스케줄링 된다. pod 실행방법 실행방법 root@master:~# kubectl get pods No resources found in default namespace. root@master:~# cat > nginx.yaml apiVersion: v1 kind: Pod metadata: name: nginx-pod spec: containers: - name: nginx-container image: nginx:1.14 ports:.. 2021. 11. 18.
Kubernetes - static Pod (정적 파드) static Pod 란? API 서버없이 특정 노드에 있는 kubelet 데몬에 의해 직접 관리 /etc/kubernetes/manifests/ 디렉토리에 k8s yaml 파일을 저장시 적용됨 static pod 설정 파일 : /var/lib/kubelet/config.yaml static 파드 생성 1. master에서 현재 pod 조회 현재 생성된 파드가 존재하지 않음 root@master:~$ kubectl get pods -o wide No resources found in default namespace. 2. node1 에서 config 파일 확인 root@node1:~# cat /var/lib/kubelet/config.yaml apiVersion: kubelet.config.k8s.io/v.. 2021. 11. 18.
Kubernetes - kubectl 명령어 실습 kubectl 개념 kubectl 이란? 쿠버네티스 API에 요청할때 사용하는 명령어 kubectl 명령어 구조 kubectl [command] [TYPE] [NAME] [flags] command : 자원에 실행할 명령 (create, get, delete, edit ...) TYPE : 자원의 타입 (node, pod, service ...) NAME : 자원의 이름 flags : 부가적으로 설정할 옵션 (--help, -o options) 예) kubectl get pod webserver -o wide webserver 이름의 POD를 상세히 조회한다. kubectl - node 명령어 node 조회하기 root@master:~# kubectl get nodes NAME STATUS ROLES A.. 2021. 11. 14.
728x90
반응형