본문 바로가기

CKA3

[k8s] Persistent Volume 1. PV ( Persistent Volume ) 란? Persistent Volume (PV)은 Kubernetes의 스토리지 추상화로, 이를 사용하는 pod 에서 storage 구성을 분리할 수 있습니다. Persistent Volume 은 Cluster 관리자가 동적으로 프로비저닝하거나 정적으로 구성할 수 있는 클러스터 전체 리소스입니다. Pod 와 Storage 백엔드 사이에 추상화 계층을 제공하여 애플리케이션의 유연성과 이식성을 높일 수 있습니다. 2. Pv 예제 Persistent Volume 구성해보기 * Create a persistent volume with name app-config, of capacity 1Gi and access mode ReadWriteMany * StorageC.. 2023. 4. 20.
[k8s] Cluster Maintenance OS Upgrades software 업그레이드 또는 security patch 등 node를 내려야할 일이 있을 때, 어떻게 안정적으로 클러스터를 유지할까? 노드가 5분(—pod-eviction-timeout) 안에 정상화되지 않을 경우 pod은 종료됨 replicaset 의 pod이었을 경우, 다른 노드에 재생성됨 그냥 pod일 경우 사라지게됨 안전하게 노드를 작업하기 위해, drain을 통해 모든 workload를 다른 노드로 옮길 수 있음 kubectl drain node-1 기존 노드에서 pod들이 종료되고, 다른 노드에서 재생성됨 또한 노드가 cordon되고, unshedulable 로 마크됨 제약을 삭제할 때까지, 아무 pod도 스케줄되지 않음 pod이 다른 노드에서 안전하면, 노드를 reb.. 2023. 4. 8.
[k8s] kubernetes Scheduling Manual Scheduling 원하는 node를 지정할 수 있음. https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename apiVersion: v1 kind: Pod metadata: name: nginx spec: containers: - name: nginx image: nginx nodeName: kube-01 nodeName 속성 추가 생성 후 assign 은 불가 ⇒ 필요시 Binding object를 생성해(kind: Binding) api post 로 요청해야 함 Label & Selectors object 를 group화하고, 선택할 때 사용 apiVersion: v1 kind: Pod metada.. 2023. 4. 5.