[쿠버네티스 스토리지] hostpath 컨테이너와 노드 간 데이터 공유

hi·2023년 8월 1일
0

쿠버네티스

목록 보기
40/60

hostPath 볼륨

  • 노드의 파일 시스템에 있는 특정 파일 또는 디렉터리 지정
  • 영구 스토리지
  • 다른 노드의 파드끼리 데이터 공유는 안됨 (주로 노드 로그 모니터링 용도)


  • hostPath 사용 현황 파악
$ kubectl get pods --namespace kube-system
NAME READY STATUS RESTARTS AGE
event-exporter-v0.2.4-5f7d5d7dd4-86zvt 2/2 Running 0 47h
fluentd-gcp-scaler-7b895cbc89-6w26t 1/1 Running 0 47h
fluentd-gcp-v3.2.0-fgc7k 2/2 Running 0 46h
fluentd-gcp-v3.2.0-lj6zg 2/2 Running 0 46h
[]
$ kubectl describe pod fluentd-gcp-v3.2.0-fgc7k --namespace kube-system
Name: fluentd-gcp-v3.2.0-fgc7k
Namespace: kube-system
[]
Volumes:
varlog:
Type: HostPath (bare host directory volume)
Path: /var/log
HostPathType:
varlibdockercontainers:
Type: HostPath (bare host directory volume)
Path: /var/lib/docker/containers
HostPathType:
[중략]

0개의 댓글