{"id":404,"date":"2021-12-21T13:46:15","date_gmt":"2021-12-21T12:46:15","guid":{"rendered":"http:\/\/daisy-street.fr\/?p=404"},"modified":"2021-12-21T16:25:32","modified_gmt":"2021-12-21T15:25:32","slug":"persistant-volume","status":"publish","type":"post","link":"https:\/\/daisy-street.fr\/index.php\/2021\/12\/21\/persistant-volume\/","title":{"rendered":"Persistant Volume or Nfs"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>smb<\/p>\n\n\n\n<p>\/\/192.168.1.40\/9-VideoClub \/Videoclub cifs uid=0,credentials=\/home\/david\/.smb,iocharset=utf8,noperm 0 0<\/p>\n\n\n\n<p>nfs<\/p>\n\n\n\n<p>mount  -t nfs 192.168.1.40:\/mnt\/Magneto\/9-VideoClub \/Videoclub <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installer nfs<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install nfs-common<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Distribuer des volumes specifiques par fonction<\/h2>\n\n\n\n<p>Monter le PersistantVolumes fonctionel<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apiVersion: v1\nkind: PersistentVolume\nmetadata:\n  name: pv-9\nspec:\n  capacity:\n    storage: 1000Gi\n  volumeMode: Filesystem\n  accessModes:\n    - ReadWriteOnce\n  persistentVolumeReclaimPolicy: Recycle\n  storageClassName: slow\n  mountOptions:\n    - hard\n    - nfsvers=4.1\n  nfs:\n    path: \/mnt\/Magneto\/9-VideoClub\n    server: 192.168.1.40<\/code><\/pre>\n\n\n\n<p>on claim le volume fonctionel<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: pvc-9\nspec:\n  accessModes:\n    - ReadWriteOnce\n  resources:\n    requests:\n      storage: 1000Gi\n  selector:\n    matchLabels:\n      pv: pv-9\n<\/code><\/pre>\n\n\n\n<p>puis on monte le pvc dans chaque deployement de pod avec des subpaths<\/p>\n\n\n\n<p>ex:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\napiVersion: v1\nkind: Pod\nmetadata:\n  name: mypod\nspec:\n      containers:\n        - name: sickchillserver\n          image: lscr.io\/linuxserver\/sickchill\n          volumeMounts:\r\n            - mountPath: \/config\r\n              name: tr-config\r\n            - mountPath: \/downloads\r\n              name: tr-videoclub\r\n              subPath: 00-Tmp\/sickchill\/downloads\r\n            - mountPath: \/tv\r\n              name: tr-videoclub\r\n              subPath: 30-Series\r\n            - mountPath: \/anime\r\n              name: tr-videoclub\r\n              subPath: 40-Anime\n  volumes:\n        - name: tr-videoclub\n          persistentVolumeClaim:\n            claimName: pvc-9\n        - name: tr-config\n          hostPath:\n            path: \/usr\/kubedata\/sickchillserver\/config\n            type: DirectoryOrCreate\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Autre methode<\/h2>\n\n\n\n<p>pour bypasser la declaration d&#8217;un persistentVolume on peut declarer le le repertoire NFS directement dans le Deployement\/pod<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n\napiVersion: v1\nkind: Pod\nmetadata:\n  name: mypod\nspec:\n      containers:\n        - name: sickchillserver\n          image: lscr.io\/linuxserver\/sickchill\n          volumeMounts:\n            - mountPath: \/config\n              name: tr-config\n            - mountPath: \/downloads\n              name: tr-videoclub\n              subPath: 00-Tmp\/sickchill\/downloads\n            - mountPath: \/tv\n              name: tr-videoclub\n              subPath: 30-Series\n            - mountPath: \/anime\n              name: tr-videoclub\n              subPath: 40-Anime\n  volumes:\n        - name: tr-videoclub\n          nfs:\n            server: 192.168.1.40\n            path: \/mnt\/Magneto\/9-VideoClub\n        - name: tr-config\n          hostPath:\n            path: \/usr\/kubedata\/sickchillserver\/config\n            type: DirectoryOrCreate<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>smb \/\/192.168.1.40\/9-VideoClub \/Videoclub cifs uid=0,credentials=\/home\/david\/.smb,iocharset=utf8,noperm 0 0 nfs mount -t nfs 192.168.1.40:\/mnt\/Magneto\/9-VideoClub \/Videoclub Installer nfs Distribuer des volumes specifiques par fonction Monter le PersistantVolumes fonctionel on claim le volume fonctionel puis on monte le pvc dans chaque deployement de pod avec des subpaths ex: Autre methode pour bypasser la declaration d&#8217;un persistentVolume on peut declarer &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/daisy-street.fr\/index.php\/2021\/12\/21\/persistant-volume\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Persistant Volume or Nfs&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[64,33,46,63],"class_list":["post-404","post","type-post","status-publish","format-standard","hentry","category-non-classe","tag-file","tag-kubernetes","tag-nfs","tag-volume"],"jetpack_publicize_connections":[],"featured_image_src":null,"author_info":{"display_name":"admin9483","author_link":"https:\/\/daisy-street.fr\/index.php\/author\/admin9483\/"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts\/404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/comments?post=404"}],"version-history":[{"count":7,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts\/404\/revisions"}],"predecessor-version":[{"id":417,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/posts\/404\/revisions\/417"}],"wp:attachment":[{"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/media?parent=404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/categories?post=404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daisy-street.fr\/index.php\/wp-json\/wp\/v2\/tags?post=404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}