In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Type of data persistence:
1.emptyDir: can only be used as temporary storage. If the container is deleted, the data still exists, and if the Pod is deleted, the data will also be deleted.
2.HostPath: not many scenarios are used, which will increase the coupling between Pod and nodes.
3.PV, PVC: based on NFS services. The PV state must be Available, the access mode must be the same and the name of the storage class must be the same.
Error: Pod keeps rebooting:
1.swap did not shut down, causing the cluster to run improperly.
two。 Out of memory, the running service will restart.
Note: create PV based on NFs, and PVC.
And you need to create the host directory required by PV.
Second, do an experimental analogy to see how two PV,PVC with different space sizes are associated with PV in the cluster. 1. Create PV (create two PV with different space sizes Web-pv1 and web-pv2) 1. [root@master yaml] # vim web1.yaml 2. 3.kind: PersistentVolume 4.apiVersion: V1 5.metadata: 6. Name: web-pv1 7.spec: 8. AccessModes: 9.-ReadWriteOnce 10. Capacity: 11. Storage: 1Gi 12. PersistentVolumeReclaimPolicy: Recycle 13. StorageClassName: nfs 14. Nfs: 15. Path: / nfsdata/web1 16. Server: 192.168 .1.1 17. 18. [root@master yaml] # mkdir / nfsdata/web1 19. [root@master yaml] # kubectl apply-f web1.yaml 20.persistentvolume/web-pv1 created 21. [root@master yaml] # kubectl get pv 22.NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE 23.web-pv1 1Gi RWO Recycle Available nfs 7s 2. Create a second Pv1. [root@master yaml] # vim web2.yaml 2.kind: PersistentVolume 3.apiVersion: V1 4.metadata: 5. Name: web-pv2 6.spec: 7. AccessModes: 8.-ReadWriteOnce 9. Capacity: 10. Storage: 2Gi 11. PersistentVolumeReclaimPolicy: Recycle 12. StorageClassName: nfs 13. Nfs: 14. Path: / nfsdata/web2 15. Server: 192.168.1.116. 17. [root@master yaml] # kubectl apply-f web2.yaml 18.persistentvolume/web-pv2 created 19. 20. [root@master yaml] # kubectl get pv 21.NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE 22.web-pv1 1Gi RWO Recycle Available nfs 103s 23.web-pv2 2Gi RWO Recycle Available nfs 14s
3. Create PVC1. [root@master yaml] # vim web-pvc.yaml
Br/ > 3.apiVersion: v1
4.metadata:
5. Name: web-pvc
6.spec:
7. AccessModes:
8.-ReadWriteOnce
9. Resources:
10. Requests:
11. Storage: 1Gi
12. StorageClassName: nfs
13. [root@master yaml] # kubectl apply-f web-pvc.yaml 17.web-pvc Bound web-pv1 1Gi RWO nfs 5s
18. [root@master yaml] # kubectl get pv
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.