³ö É« ×Ê Ñ¶¡¡¡¡¿ì ÈË Ò» Ïß
¡¡ Ê×Ò³¡¡|¡¡Êг¡ÐÐÇé¡¡|¡¡ÐÂÎŶ¯Ì¬¡¡|¡¡²úÆ·ÆÀ²â¡¡|¡¡Ó²¼þÎÄÝÍ¡¡|¡¡ÊýÂëʱÉС¡|¡¡ò°½­Â·¶þÊÖ¡¡|¡¡ÂÛ̳¡¡|¡¡Ð¡ÐÜÍƼöµê
¡¡Ê×Ò³ ¡ú Òµ½ç¶¯Ì¬
¡¡
ÎÄÕÂËÑË÷: Àà±ð:
¡¡

ÈÝÆ÷ͬ³ÇË«»îÊý¾ÝÖÐÐÄ×î¼Ñʵ¼ù

¡¾×ªÔØ¡¿¡¡×÷Õß:ÐÂΟå

¡¡

¡¾ÎÄÕ¼ò½é¡¿
ÈÝÆ÷ͬ³ÇË«»îÊý¾ÝÖÐÐÄ×î¼Ñʵ¼ù ... ......

ÕªÒª£º±¾Îĸø³öÁËÈÝÆ÷Ë«»îÊý¾ÝÖÐÐĵÄÅäÖþÙÀýºÍ°¸Àý²Î¿¼£¬ÓÐ״̬ÈÝÆ÷Ó¦ÓýøÈëÉú²úϵͳÔÙÎÞºó¹ËÖ®ÓÇ

Ç°ÑÔ

Ä¿Ç°ÈÝÆ÷Ó¦ÓÃÒѾ­¿ªÊ¼Á÷ÐÐÆðÀ´£¬ÌرðÊÇÔÚ½ðÈÚÐÐÒµ£¬ºÜ¶à´´ÐÂÆóÒµÒѾ­ÔÚÉú²úϵͳÖÐʹÓ᣺ܶàÈÝÆ÷Ó¦Óö¼ÊÇÓÐ״̬µÄ£¬±ÈÈçºÜ¶à·Ö²¼Ê½Êý¾Ý¿â£¬½øÈëÉú²úϵͳҲ¾ÍÒâζÕâЩÈÝÆ÷Ó¦ÓÃÒ²ÐèÒª¸ß¼¶±ðµÄÈÝÔÖÖ§³Ö¡£XSKYÐdz½ÌìºÏ×÷Ϊ¹úÄÚÂÊÏÈÖ§³ÖCSI£¨ÈÝÆ÷´æ´¢½Ó¿Ú£©±ê×¼µÄרҵSDS³§ÉÌ£¬ÔÚÈÝÆ÷´æ´¢·½ÃæÓкܶà³É¹¦µÄ°¸Àý¡£¶øÇÒ£¬Ðdz½ÌìºÏ²ÉÓÃÑÓÕ¹¼¯ÈºÅäºÏ¸÷¸ö°æ±¾µÄKubernetes£¨K8s£©ÈÝÆ÷±àÅÅÈí¼þ£¬°ïÖúÓû§ÊµÏÖʵÏÖÈÝÆ÷Ë«»îÊý¾ÝÖÐÐÄ£¬ÖúÁ¦ÈÝÆ÷Ó¦ÓÃÖ§³ÅºËÐÄÒµÎñ¡£

ÑÓÕ¹¼¯Èº

Ðdz½ÌìºÏÑÓÕ¹¼¯Èº¹¦ÄÜΪ¿çµØÓòµÄÒµÎñË«»î·½°¸Ìṩ´æ´¢Ö§³Å¡£ ÑÓÕ¹¼¯ÈºÐèÒªÓëÒµÎñ½ôÃÜÅäºÏʵÏÖÒµÎñ¸ß¿ÉÓ㬱¾ÎÄÒÔ¶Ô½ÓK8sÐéÄ⻯³¡¾°ÎªÀý½éÉÜÒµÎñ¸ß¿ÉÓýâ¾ö·½°¸¼°ÆäÅäÖ÷½·¨¡£

³öÓڶԹؼüÒµÎñÈÝÔÖ£¬±ÜÃâÒµÎñå´»ú£¬±£ÕÏÒµÎñ³ÖÐø¿ÉÓõÄÄ¿µÄ¿¼ÂÇ£¬ºÜ¶àÆóÒµ¿ªÊ¼Ð˽¨Ë«»îÊý¾ÝÖÐÐÄ£¬ÌرðÊǽðÈÚÐÐÒµ¡£XEDP¿É¿çͬ³ÇÊý¾ÝÖÐÐIJ¿Êð´æ´¢ÑÓÕ¹¼¯Èº£¬ÊµÏÖÊý¾ÝÖÐÐļ¶¹ÊÕÏÓò£¬´æ´¢¶à¸±±¾Êý¾Ý¾µÏñÔÚÁ½¸öÊý¾ÝÖÐÐÄ£¬±£Ö¤ÈκÎÒ»¸öÊý¾ÝÖÐÐÄÄÚËùÓд洢½Úµã¹ÊÕÏ£¬ÒµÎñÁãÇл»¡¢Êý¾ÝÁ㶪ʧ¡£

Óû§´î½¨XEDPÑÓÕ¹¼¯ÈºÔÚË«»îÊý¾ÝÖÐÐÄ£¬³ýÁËÐè±£Ö¤´æ´¢³Ø¿çÁ½Õ¾µã´´½¨±£Ö¤ÒµÎñÊý¾Ý¶ÔÏó¶à¸±±¾£¬Í¬Ê±ÐèÒªÔÚÁ½¸öÊý¾ÝÖÐÐÄƽ¾ù·ÖÅäMON½ÇÉ«£¬²¢ÔÚµÚÈýÕ¾µã²¿ÊðÒ»¸öMONÖٲýڵ㡣ËùÓÐÕ¾µãÖ®¼äͨ¹ý¸ßËÙ¡¢µÍÑÓ³ÙÍøÂçÁ¬½Ó¡£Ã¿¸öÕ¾µã±»ÅäÖÃ×÷Ϊһ¸öµ¥¶ÀµÄ¹ÊÕÏÓò£¬MON×îС֧³ÖÅäÖÃÊÇ1£¨Êý¾ÝÖÐÐÄA MONÊýÁ¿£©+1£¨Êý¾ÝÖÐÐÄB MONÊýÁ¿£©+1£¨ÖٲýڵãMONÊýÁ¿£©£¨3½Úµã£©¡£µ±³öÏÖÊý¾ÝÖÐÐĹÊÕÏ£¨ÈçµØÓòÐÔÔÖº¦£©Ê±£¬ÈÔ½«Óг¬¹ý50%µÄMON×é¼þ¿ÉÓ㬴Ӷø±£ÕÏXEDP·Ö²¼Ê½´æ´¢¼¯ÈºµÄ³ÖÐø¿ÉÓá£XEDP·Ö²¼Ê½´æ´¢µÄÕâÖÖÌØÐÔ£¬Ê¹µÃÑÓÕ¹¼¯Èº³ÉΪʵÏÖÆóÒµÊý¾ÝË«»îÊý¾ÝÖÐÐÄ×î¼ò±ã£¬ÇÒÇÐʵ¿ÉÐеķ½°¸¡£

XEDP·Ö²¼Ê½´æ´¢ÏµÍ³Ö§³Ö½«¼¯ÈºÄڵĴ洢½Úµã·ÅÖÃÔÚ²»Í¬µÄÊý¾ÝÖÐÐÄÖУ¬È·±£Ò»¸öÊý¾Ý¶ÔÏóµÄ¶à¸ö¸±±¾±£´æÔÚ²»Í¬µØÀíλÖõĴ洢½ÚµãÉÏ£¬ÊµÏֶั±¾Êý¾Ý¸ß¿ÉÓᣴӹÜÀíÃæµ½µ×²ã´æ´¢£¬¿ÉÔËÐÐÔÚ¶þ²ã»òÈý²ãÍøÂçÖ®ÉÏ£¬Ö§³Ö²»Í¬×ÓÍø¼äµÄ²¿ÊðͨÐÅ£¬½µµÍÓû§ÍøÂçÅäÖõĸ´ÔӶȡ£

ÈÝÆ÷¶Ô½Ó

k8s¼¯ÈºÈçºÎÔÚSDSÑÓÕ¹¼¯ÈºÖ®ÉÏÅäÖÃÓëʹÓã¿

k8sÓëXSKY SDSÖ®¼äͨ¹ýCSIÀ´ÊµÏÖ¶Ô½Ó¡£CSI ¹Ù·½ÈÏÖ¤£ºhttps://kubernetes-csi.github.io/docs/drivers.html

XSKY CSI Driver·ÖΪBlock DriverÓë NFS driver¡£¹ÜÀíʹÓÃXMS API¶Ô½Ó¡£IOÃ棬Block DriverʹÓÃiSCSIЭÒéÓëk8s node½ÚµãͨÐÅ£»NFS driverʹÓÃNFSЭÒéÓëk8s node½ÚµãͨÐÅ¡£Block volumeÖ§³ÖVIPÓë¶à·¾¶·½Ê½½øÐоí¹ÒÔØ¡£

ÑÓÕ¹¼¯ÈºÖУ¬Ä¿Ç°½¨ÒéCSI iSCSI DriverʹÓöà·¾¶½øÐжԽӡ£

ͨ¹ýÔÚ·ÃÎÊ·¾¶ÖÐÌí¼Ó¶à¸öÊý¾ÝÖÐÐĵĶà¸öÍø¹Ø½ÚµãÀ´±£Ö¤¶à·¾¶Á´Â·ÈßÓà¡£µ±ÔÖÄÑ·¢Éú£¬¶à·¾¶µÄÈßÓà¿ÉÒÔ±£ÕÏÊý¾Ý·ÃÎʵÄÕý³£¡£

CSI iSCSI DriverÅäÖùý³Ì

1¡¢k8sƽ̨¿ªÆô¿ìÕÕ¡¢À©ÈÝ¡¢¿Ë¡¡¢raw¹¦ÄÜ

k8sĬÈÏ먦Æô¿ìÕÕ¡¢À©ÈÝ¡¢¿Ë¡¡¢raw¹¦ÄÜ£¬ÐèÒªÅäÖÃkube-apiserver.yaml¡¢kube-controller-manager.yaml¡¢10-kubeadm.conf ÖеIJÎÊý¿ªÆô¹¦ÄÜ¡£Èç¹ûk8sа汾¹¦ÄÜGA£¬¾Í²»ÔÙÐèÒªÅäÖá£

°æ±¾ËµÃ÷¼ûk8s¹ÙÍø£ºhttps://kubernetes-csi.github.io/docs/drivers.html

Ìí¼ÓÈçϲÎÊý£º

BlockVolume£º¿ªÆôraw¾í¹¦ÄÜ

CSIBlockVolume£º¿ªÆôraw¾í¹¦ÄÜ

VolumeSnapshotDataSource£º¿ªÆô¿ìÕÕ¹¦ÄÜ

ExpandCSIVolumes£º¿ªÆôÀ©Èݹ¦ÄÜ

ExpandInUsePersistentVolumes£º¿ªÆôÔÚÏßÀ©Èݹ¦ÄÜ

VolumePVCDataSource£º¿ªÆô¿Ë¡¹¦ÄÜ£¨k8s 1.15.0+°æ±¾Ö§³Ö£©

ʹÓÃrancher¶Ô½Óʱ£¬ÐèÒªÔÚrancher¹ÜÀí½çÃæÅäÖÃkube-apiserver¡¢kube-controller¡¢kubeletÈý¸ö·þÎñ£¬ÉÏÒ»²½ÖÐÌáµ½µÄ²ÎÊý¡£

2¡¢SecretÅäÖÃÓë´´½¨

´Ë¹¦ÄÜÓÃÓÚ±£´æSDS¹ÜÀíÓû§µÄÓû§ÃûÓëÃÜÂ룬Ìṩ¸øCSI DriverʹÓá£

3¡¢AccessPath´´½¨

# vi cr-ap.yaml 
apiVersion: "sds.xsky.com/v1" 
kind: AccessPath 
metadata: 
  name: my-ap   #kuberneteÏÔʾµÄ×ÊÔ´Ãû³Æ 
spec: 
  name: myap    #SDS´æ´¢ÉÏAccessPathÃû³Æ 
  type: Kubernetes  #accesspathÀàÐÍ£¬Ä¬ÈÏΪKubernetes 
  cluster_info: 
    xmsServers: 10.252.90.39  #SDS¼¯Èº¹ÜÀí½ÚµãIPµØÖ·£¬¿ÉÅäÖöà¸ö£¬¶ººÅ¸ô¿ª 
    secret_name: test-secret    #SDS¼¯Èºsecret 
secret_namespace: default  #secretËùÊôÃüÃû¿Õ¼ä 
  gateway: vm39,vm40,vm41   #ÅäÖÿéÍø¹Øhostname 
  vip_group:                #ÅäÖÃvip 
    preempt: false #optional   #vipÊÇ·ñ»ØÇР
    vips:                  #Èç²»ÐèÒªvip,ÇëÅäÖÃΪvips: [],²¢Ê¹ÓÃ#ºÅ×¢ÊÍÏÂÃæÈýÐР
      - vip: 10.252.90.100   #vip ip 
        mask: 24          #vip×ÓÍø   
        default_gateway: vm39  #vip´´½¨½Úµã

4¡¢StorageClassÅäÖÃÓë´´½¨

ÃèÊöÈçºÎÅäÖÃStorageClass£¬¼°²ÎÊý½âÊÍ¡¢¶¨ÒåÒ»¸öºó¶Ë´æ´¢¡£

apiVersion: storage.k8s.io/v1 
kind: StorageClass 
metadata: 
  name: my-sc    # StorageClassµÄÃû³Æ 
parameters: 
  accessPaths: my-ap     # ÉÏÒ»²½Öд´½¨µÄAccessPathÃû³Æ 
  fsType: ext4        # Îļþϵͳ¸ñʽ¡£Ö§³Öxfs,ext4,ext3 
  pool: poolB        # ´æ´¢³ØÃû³Æ 
  xmsServers: 10.252.3.179,10.252.3.180,10.252.3.181    # SDS¹ÜÀí½Úµã¹ÜÀíIP£¬½¨ÒéÅäÖÃ3¸ö£¬ÒÔ¶ººÅ¸ô¿ª,csi iscsi driver˳ÐòʹÓÃip·ÃÎÊ 
  csi.storage.k8s.io/provisioner-secret-name: test-secret    # secretÃû³Æ  
  csi.storage.k8s.io/provisioner-secret-namespace: default    #  secretÃüÃû¿Õ¼ä  
provisioner: iscsi.csi.xsky.com    # Ä¬ÈÏΪiscsi.csi.xsky.com  
reclaimPolicy: Delete             
allowVolumeExpansion: true        # ÊÇ·ñÔÊÐí¾íÀ©ÈÝ¡£trueΪÔÊÐí£¬falseΪ²»ÔÊÐí  
mountOptions: 
  - _netdev            # Ìí¼Ómount²ÎÊý£¬Ê¹ÓÃiscsiЭÒéʱ£¬ÐèÒª°Ñ¹ÒÔصĿéÉ豸±êʶΪÍøÂçÉ豸¡£

5¡¢PVCÅäÖÃÓë´´½¨

PVC×ÊÔ´£¬ÒÀÀµstorageclass£¬ÓÃÓÚ¶¨Òå¼°×Ô¶¯´´½¨Ò»¸öºó¶Ë¾í¡£

apiVersion: v1 
kind: PersistentVolumeClaim 
metadata: 
  name: my-pvc      #name£ºpvcÃû³Æ 
  namespace: default        #´Ëpvc°²×°ÔÚÄĸöÃüÃû¿Õ¼ä 
spec:  
  volumeMode: Filesystem    #Filesystem£ºÒÔÎļþϵͳ¹ÒÔØ£¬Îļþϵͳ¸ñʽÔÚstrogeclass¶¨Òå 
                            #Block£ºÒÔÂã¾í·½Ê½¹ÒÔØ          
  storageClassName: my-sc 
  accessModes: 
  - ReadOnlyMany            #ReadWriteOnce£ºÖ»ÔÊÐí±¾½Úµã¹ÒÔØ 
                            #ReadOnlyMany£ºÔÊÐí¶à½ÚµãÒÔÖ»¶Á·½Ê½¹ÒÔØ£¬podÖйÒÔؾíÐèÒªÅäÖóÉÖ»¶Á¡£ 
                            #ReadWriteMany£ºÔÊÐí¶à½ÚµãÒÔ¶Áд·½Ê½¹ÒÔØ£¨iscsi²»Ö§³Ö£¬NFSÖ§³Ö£© 
  resources: 
    requests: 
      storage: 20Gi

6¡¢PODÅäÖÃÓë´´½¨

PodÊÇk8s»ù±¾×ÊÔ´£¬PodÖпÉÒÔÅÜÒ»¸ö»ò¶à¸öÈÝÆ÷£¬Ò²¿ÉÒÔ¹ÒÔر¾µØ»òºó¶Ë´æ´¢¾í¡£

apiVersion: v1 
kind: Pod 
metadata: 
  name: my-pod                                                                                  
spec: 
  containers: 
   - name: web-server 
     image: nginx 
     volumeMounts:                         #¹ÒÔØÎļþϵͳ,¶¨Òåpvc¸ñʽ»¯³ÉÎļþϵͳÐÎʽ¹ÒÔص½podÄÚ(¶ÔÓ¦PVCÖеÄvolumeMode: Filesystem) 
       - name: pvc-1                       #¹ØÁªvolumesµÄÃû³Æ 
         mountPath: /var/lib/www/html      #Ö¸¶¨ÈÝÆ÷ÖйÒÔصã 
         readOnly: false                   #readOnly£º¾íÊÇ·ñÖ»¶Á¡£trueΪֻ¶Á£¬falseΪ¶Áд,ÔÚÏÂÃæ¾íÉ϶¨ÒåÒ²¿ÉÒÔ 
  
   #  volumeDevices:                        #¹ÒÔØÂãÉ豸,¶¨ÒåpvcÒÔÂãÉ豸ÐÎʽ¹ÒÔص½podÄÚ£¨¶ÔÓ¦PVCÖеÄvolumeMode: Block£© 
   #     - devicePath: /dev/xda             #°ó¶¨µ½ÈÝÆ÷ÅÌ·û 
   #       name: nginx-storage-block        #¹ØÁª¾íµÄÃû³Æ 
  
  volumes:                                 #¶¨Òå¾íÐÅÏ¢£¬Ö¸¶¨Îªpvc¾í 
   - name: pvc-1                      
     persistentVolumeClaim: 
       claimName: my-pvc          #Ö¸¶¨PVC 
       readOnly: false

7¡¢VolumeSnapshotClassÅäÖÃÓë´´½¨

´Ë×ÊÔ´ÓÃÓÚ¶¨Òå¿ìÕÕ¡£

apiVersion: snapshot.storage.k8s.io/v1alpha1 
kind: VolumeSnapshotClass 
metadata: 
  name: csi-hostpath-snapclass        # VolumeSnapshotClassÃû³Æ  
parameters: 
  flatten: "true"        # restoreʱÊÇ·ñ¶ÏÁ´,trueΪ¶ÏÁ´£¬falseΪ²»¶ÏÁ´  
  use: "true"            # ÊÇ·ñÔÊÐírestore,trueΪÔÊÐí£¬falseΪ²»ÔÊÐí  
snapshotter: iscsi.csi.xsky.com         
deletionPolicy: Delete        # Retain£º±£Áôºó¶Ë¿ìÕÕ Delete£ºÉ¾³ýºó¶Ë¿ìÕÕ

CSI NFS DriverÅäÖùý³Ì

 

 

1¡¢NFS´´½¨

ʹÓÃchromeä¯ÀÀÆ÷µÇ¼SDS dashboard£¬·Ö±ð´´½¨Îļþ¿Í»§¶Ë&¿Í»§¶Ë×é¡¢ÎļþÍø¹Ø×é¡¢Îļþϵͳ£¬Ìí¼ÓNFS¹²Ïí ¡£

2¡¢StorageClass ÅäÖÃÓë´´½¨ 

apiVersion: storage.k8s.io/v1 
kind: StorageClass 
metadata: 
   name: csi-nfs-sc 
provisioner: com.nfs.csi.xsky 
parameters: 
    xmsServers: 10.252.3.179,10.252.3.180,10.252.3.181    # SDS¹ÜÀí½Úµã¹ÜÀíIP£¬½¨ÒéÅäÖÃ3¸ö£¬ÒÔ¶ººÅ¸ô¿ª  
    user: admin        # SDS¹ÜÀí½ÚµãÓû§Ãû  
    password: admin    # SDS¹ÜÀí½ÚµãÃÜÂë  
shares: 192.168.120.123:/sdsfs/k8s-nfs/     # NFS¹²ÏíµØÖ·£¬ÅäÖöà¸öÒÔ¶ººÅ¸ô¿ª  
    clientGroupName: "k8s-cluster"        # ¿Í»§¶ËÃû³Æ£¬É¾³ý´Ë×ֶλòÕß×Ö¶ÎֵΪ¿Õ±íʾ¹«¿ª¹²Ïí  
reclaimPolicy: Delete        # É¾³ý²ßÂÔ  
mountOptions: 
- vers=3        # vers£ºÖ§³Öv3,v4¡£Ä¬ÈÏʹÓÃv3

3¡¢PVCÅäÖÃÓë´´½¨

apiVersion: v1 
kind: PersistentVolumeClaim 
metadata: 
  name: csi-nfs-pvc    # PVCÃû³Æ 
spec: 
  accessModes: 
  - ReadWriteOnce        # ·ÃÎÊģʽ  
                        # ReadWriteOnce£ºÖ»ÔÊÐíµ¥½Úµã¹ÒÔØ 
                        # ReadOnlyMany£ºÔÊÐí¶à½ÚµãÒÔÖ»¶Á·½Ê½¹ÒÔØ£¬podÖйÒÔؾíÐèÒªÅäÖóÉÖ»¶Á¡£ 
                        # ReadWriteMany£ºÔÊÐí¶à½ÚµãÒÔ¶Áд·½Ê½¹ÒÔØ£¨iscsi²»Ö§³Ö£¬NFSÖ§³Ö£© 
  resources: 
    requests: 
      storage: 5Gi 
  storageClassName: csi-nfs-sc

4¡¢pod ÅäÖÃÓë´´½¨

apiVersion: v1 
kind: Pod 
metadata: 
  name: csi-nfs-demopod 
spec: 
  containers: 
   - name: web-server 
     image: nginx  
     volumeMounts: 
       - name: mypvc    # ±¾ÅäÖÃÎļþ¶¨ÒåµÄ¾íÃû³Æ  
         mountPath: /var/lib/www/html    # ¹ÒÔص½ÈÝÆ÷ÖеÄĿ¼  
  volumes: 
   - name: mypvc        # ±¾ÅäÖÃÎļþ¶¨ÒåµÄ¾íÃû³Æ  
     persistentVolumeClaim: 
       claimName: csi-nfs-pvc    # pvcÃû³Æ  
       readOnly: false        # trueΪֻ¶Á£¬falseΪ¶Áд

ÈÝÔÖ»Ö¸´

µ±XSKYµÄÑÓÕ¹¼¯ÈºÓÃÓÚK8sÈÝÆ÷¼¯ÈºÈÝÔÖ£¬ÈçºÎ½øÐÐpvc»Ö¸´£¿

ÔÚK8sÕâ¶ËÐèҪʹÓõ½Ë«»îÔËά¹¤¾ß£¬¸ºÔؾùºâ×é¼þÖ®¼äҲͨ¹ýHA²¿Êð·½Ê½±£Ö¤Æä¸ß¿ÉÓã¬ÈçʹÓÃKeepalive£¬»òÕßͳһ²ÉÓà pacemaker+corosync ×é¼þ±£Ö¤ÈÝÆ÷µÄ¸ß¿ÉÓúÍÎȶ¨ÐÔ£¬Ö÷ҪĿµÄÊÇͬ²½Á½¸ö¼¯ÈºÖ®¼äµÄ¼ÆËã¶ËÏà¹ØÎļþ¡£Õû¸ök8s¼¯ÈºÈÝÔÖÐèÒª¿½±´ËùÓÐk8s×ÊÔ´£¬´æ´¢Ôò¿ÉÒÔͨ¹ýXSKYÑÓÕ¹¼¯ÈºÀ´ÊµÏÖ¡£

²½ÖèÈçÏ£º

Ö÷Kubernetes¼¯ÈºÓ뱸Kubernetes¼¯Èº²¿ÊðͬһÌ×XSKY CSI Driver£¬²¿Êð·½·¨²Î¿¼×î¼Ñʵ¼ùÊֲᡣ

NFS ¶Ô½Ó£¬Íø¹Ø×éÐèÒªÌí¼ÓÁ½¸öÖÐÐÄÍø¹Ø½Úµã¡£VIPÔËÐÐÔÚÖ÷ÖÐÐĽڵ㡣

iSCSI¶Ô½Ó£¬APÐèÒª¹ØÁªÁ½¸öÖÐÐÄÍø¹Ø½Úµã¡£

ʹÓÃË«»îÔËά¹¤¾ß±¸·ÝÖ÷k8s¼¯ÈºÖеÄsc£¬pv£¬pvc£¬pod£¬configmaps£¬secretÏà¹ØµÄÅäÖÃÐÅÏ¢µ½±¸K8s¼¯ÈºÖÐ

# kubectl get sc iscsi-sc -oyaml > sc.yaml 
# kubectl get pv pvname -oyaml > pv.yaml 
# kubectl get configmaps csi-iscsi-vid-pvname -oyaml > pv-configmaps.yaml 
# kubectl get pvc pvcname -oyaml > pvc.yaml 
# kubectl get pod podname -oyaml > pod.yaml 
# kubectl get secret secretname -oyaml > secret.yaml   #iscsi¶Ô½ÓÐèÒªÓõ½¿½±´secret

ÐÞ¸Äpv.yaml£¬×¢Ê͵ôuidÓëclaimRef£¬persistentVolumeReclaimPolicyÐÞ¸ÄΪRetain¡£

# vim nfs-pv.yaml 
apiVersion: v1 
kind: PersistentVolume 
    pv.kubernetes.io/provisioned-by: com.nfs.csi.xsky 
  creationTimestamp: "2020-05-12T09:41:07Z" 
  finalizers: 
  - kubernetes.io/pv-protection 
  - external-attacher/com-nfs-csi-xsky 
  name: pvc-a5ff70ef-9434-11ea-a29c-fa8f374b5500 
  resourceVersion: "64802021" 
  selfLink: /api/v1/persistentvolumes/pvc-a5ff70ef-9434-11ea-a29c-fa8f374b5500 
  #uid: b455608e-9434-11ea-a29c-fa8f374b5500 
spec: 
  accessModes: 
  - ReadWriteMany 
  capacity: 
    storage: 5Gi 
  #claimRef: 
  #  apiVersion: v1 
  #  kind: PersistentVolumeClaim 
  #  name: csi-nfs-pvc 
  #  namespace: default 
  #  resourceVersion: "64801647" 
  #  uid: a5ff70ef-9434-11ea-a29c-fa8f374b5500 
  csi: 
    driver: com.nfs.csi.xsky 
    fsType: ext4 
    volumeAttributes: 
      password: admin 
      shares: 192.168.120.250:/sdsfs/csi-fs-1/ 
      storage.kubernetes.io/csiProvisionerIdentity: 1589276173990-8081-com.nfs.csi.xsky 
      user: admin 
      volumeInfo: '{"id":0,"name":"pvc-a5ff70ef-9434-11ea-a29c-fa8f374b5500","sc":{"id":0 
,"name":"","xmsServers":"10.252.90.60,10.252.90.101","user":"admin","password":"admin","client_group_name":"","shares":["192.168.120.250:/sdsfs/csi-fs-1/"]},"size":5368709120,"shares":null,"folder_id":11,"quota_tree_id":6,"gateway_group_id":2,"full_share_path":"192.168.120.250:/sdsfs/csi-fs-1/pvc-a5ff70ef-9434-11ea-a29c-fa8f374b5500","share_id":0,"client_group_id":0}'      xmsServers: 10.252.90.60,10.252.90.101 
    volumeHandle: csi-nfs-vid-pvc-a5ff70ef-9434-11ea-a29c-fa8f374b5500 
  mountOptions: 
  - vers=3 
  persistentVolumeReclaimPolicy: Retain 
  storageClassName: csi-nfs-sc 
  volumeMode: Filesystem 
status: 
  phase: Bound

±¸k8s¼¯Èº»Ö¸´sc,pv,pvc,pod¡£

# kubectl create -f sc.yaml 
# kubectl create -f pv.yaml 
# kubectl create -f configmaps.yaml 
# kubectl create -f pvc.yaml 
# kubectl create -f pod.yaml

µ½´Ë£¬pvc£¬pod»Ö¸´Íê³É¡£

³É¹¦°¸Àý¡ª¡ªÈÝÆ÷³Ö¾Ã»¯´æ´¢Ë«»îÊý¾ÝÖÐÐÄ·½°¸

ÂíÉÏÏû·Ñ½ðÈÚ

½â¾ö·½°¸£º

ÌṩһÌ×XSKYÑÓÕ¹¼¯Èº²¿Êð·½°¸£¬¹²12½Úµã£¬Âú×ãÂíÉÏÏû·Ñ½ðÈÚ´æ´¢»ù´¡¼Ü¹¹²¿ÊðÒªÇó£¬Í¬Ê±¿ÉÒÔÅäºÏÉϲãÈÝÆ÷¡¢MySQLÊý¾Ý¿âʵÏÖÒµÎñƽ̨²ã¸ß¿ÉÓý¨Éè¡£

Á½ÖÐÐÄʹÓÃÁ½¸öÑÓÕ¹³Ø£¬Ã¿¸ök8s¼¯ÈºÊ¹Óñ¾µØΪÖ÷pg pool¡£

ʹÓÃcsi iscsi driver¶¯Ì¬¶Ô½Ók8s,Ìṩ¿é´æ´¢¾í¡£

·ÃÎÊ·¾¶¹ØÁªÁ½ÖÐÐÄ¿éÍø¹Ø£¬ÊµÏÖ»ú·¿ÈÝÔÖ¡£

¿éÍø¹ØÅäÖÃVIPȨÖØ£¬ÓÅÏÈ»ú·¿ÄÚ½ÚµãÇл»¡£

Óŵ㣺

Ìṩ¿é´æ´¢¾í£¬½ÏºÃ¶ÁдÐÔÄÜ¡£

¶¯Ì¬¹©Ó¦¿é´æ´¢¾í£¬Ìṩ¾íÀ©ÈÝ¡¢¿ìÕÕ¡¢clone¡¢raw¸ß¼¶¹¦ÄÜ¡£

·ÃÎÊ·¾¶VIPÇл»Ô¼10Ãë¡£

дÔÚºóÃæ

XSKYÐdz½ÌìºÏµÄÈÝÆ÷Ë«»î½â¾ö·½°¸£¬IOÃæͨ¹ý¶ÀÓеÄÑÓÕ¹¼¯Èº¼¼Êõ£¬±£Ö¤Á½¸öÊý¾ÝÖÐÐĵÄÒ»ÖÂÐÔ£¬²¢ÇÒÒýÈëÖٲûúÖÆ£¬±£ÕϹÊÕϵĿɿ¿Çл»¡£ÔÚ¹ÜÀíÃ棬Ðdz½ÌìºÏͨ¹ýºÍKubernetes¿ªÔ´ÉçÇøºÍ¸÷¸öÈÝÆ÷ƽ̨³§É̺Ï×÷£¬ÀûÓÃK8sµÄ¿ª·ÅÐÔ£¬ÀûÓÃÏֳɵĿªÔ´×é¼þ£¬ÊµÏÖÈÝÆ÷²ãÃæºÍ¹ÜÀíÃæµÄË«»î¡£Ä¿Ç°£¬Ðdz½ÌìºÏµÄͬ³ÇÈÝÆ÷Ë«»îÊý¾ÝÖÐÐÄ·½°¸ÒѾ­ÔÚ¶à¸ö¿Í»§Éú²ú»·¾³Öв¿Ê𣬰ïÖúÆóҵȫÃæÏò΢·þÎñ»¯×ªÐÍ£¬ÌṩϵͳµÄÃô½ÝÐÔ£¬¸üºÃÓ¦¶ÔÒµÎñ±ä»¯´øÀ´µÄÌôÕ½¡£

ÃâÔðÉùÃ÷£º±¾ÎÄϵ»¥ÁªÍøתÔØ£¬±¾Õ¾²»±£Ö¤ÆäÄÚÈÝÕæʵÐÔÒ²²»Í¬ÒâÎÄÖй۵㣬Çë¶ÁÕß×ÔÐмø±ð£¬²¢ºËʵ¹ã¸æºÍÄÚÈÝÕæʵÐÔ£¬½÷É÷ʹÓ㬱¾Õ¾ºÍ±¾È˲»³Ðµ£Óɴ˲úÉúµÄÒ»Çз¨Âɺó¹û£¡»¥ÁªÍø½ðÈÚ·çÏÕ¾Þ´ó£¬Í¶×ÊÒª½÷É÷£¬ÈçÓÐÒìÒéÇëÁªÏµ021-54249915

2022Äê01ÔÂ21ÈÕ ÓÚÉϺ£

°æȨ×÷Æ· δ¾­Ðí¿É ÇëÎðתÔØ¡¡



¡¡

ÍøÓÑÆÀÂÛ (½ö¹©²Î¿¼Óë±¾Õ¾Á¢³¡ÎÞ¹Ø)


Çë·¢±íÄúµÄ¹Ûµã (¿ÉÒÔÄäÃû·¢±í£¬¼Ç¼IP£¬ÏÞ¶¨1000×ÖÄÚ)
¡¡
ÐÕÃû: ¡¡ÃÜÂë: ÐÂÓû§×¢²á
¡¡

Ïà¹ØÎÄÕ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¸ü¶àÏà¹ØÎÄÕ¿´ÕâÀï...

  • È«ÐÂAMD Radeon PRO W6000ϵÁÐÏÔ¿¨ÎªÖ÷Á.. 2022.01.20
  • ROG MAXIMUS Z690 µç¾ºÖ÷°å»ñCES 2022´´.. 2022.01.20
  • Äê»õ´ø»Ø¼Ò£¡AMDÈñÁú5 5600XдºÔÜ»ú±Ø±¸ 2022.01.17
  • AMDƾ½è¸ßÐÔÄܼÆËãµÄAmazon EC2ÐÂʵÀýÕ¹Ê.. 2022.01.13
  • »ªË¶B660ÖØÅÚÊÖÖ÷°åÇ¿ÊÆ°Ô°ñ 2022.01.13
  • »¢ÄêÐÄÒâÀñ AMDÈñÁú7 5800X´¦ÀíÆ÷ÄêÖÕÓÅÑ¡ 2022.01.13

  • ¡¡

    Copyright © 2003 - 2005 www.shxiaobear.com .All Rights Received.