티스토리 뷰

문제

  • kubectl config use-context k8s
    • Create a persistent volume with name app-config, of capacity 1Gi and access mode ReadWriteMany
    • storageClass: az-c
    • The type of volume is hostPath and its location is /srv/app-config

문제 풀이

# 1. context 변경
kubectl config use-context k8s

# 2. PV 템플릿 생성
vim pv-hostpath.yaml

....

apiVersion: v1
kind: PersistentVolume
metadata:
  name: app-config
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteMany
  storageClassName: az-c
  hostPath:
    path: /srv/app-config

 

 

Persistent Volumes

This document describes persistent volumes in Kubernetes. Familiarity with volumes, StorageClasses and VolumeAttributesClasses is suggested. Introduction Managing storage is a distinct problem from managing compute instances. The PersistentVolume subsystem

kubernetes.io

 

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2026/09   »
일 월 화 수 목 금 토
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
글 보관함