Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- stp
- ACL
- OSI 7 layer
- eigrp
- ripng
- vrrp
- ospfv3
- NAT
- Redistribute
- tunneling
- Inter VLAN
- ipv6
- CKA
- Chrony
- OSPF
- crontab
- 라우터
- 장비
- DHCP
- 스위치
- GLBP
- rip
- eigrpv2
- Etherchannel
- 명령어
- Vlan
- 헤더
Archives
- Today
- Total
Net Eng
[CKA] - Persistent Volume 생성 본문
[선수 지식]
1. 볼륨 종류
* hostPath
* emptyDir
* nfs
+
* iscsi, fc, ...
2. PV & PVC
* PV - 볼륨 정의(특성)
* PVC - 볼륨 요청(특성)
[선수 작업]
kubectl config set-context k8s --user=kubernetes-admin --cluster=kubernetes
[문제]
- 작업 클러스터: 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.
[풀이]
kubectl config use-context k8s
* k8s 클러스터 사용
apiVersion: v1
kind: PersistentVolume
metadata:
name: app-config
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClassName: az-c
hostPath:
path: /srv/app-config
* PV를 위한 yaml 파일 생성
kubectl apply -f app-config-pv.yaml
* yaml 파일 실행
kubectl get pv
* PV 확인
[참고]
'Cloud > Kubernetes' 카테고리의 다른 글
[CKA] - Check Resource Information (1) | 2024.01.23 |
---|---|
[CKA] - Persistent Volume Claim 사용하는 Pod 운영 (0) | 2024.01.22 |
[CKA] - Secret 운영 (0) | 2024.01.22 |
[CKA] - ConfigMap 운영 (1) | 2024.01.22 |
[CKA] - NodePort 서비스 생성 (1) | 2024.01.22 |