美文网首页
k8s中安装openEBS

k8s中安装openEBS

作者: 求索 | 来源:发表于2020-09-21 07:45 被阅读0次

openEBS安装

环境准备

  1. OpenEBS要求配置iSCSI客户端,并且在worker nodes上运行iscsid服务
    yum -y install iscsi-initiator-utils   
    systemctl enable --now iscsid
    
  2. 节点临时移除 k8smaster 上的 Taint
    • 查看
    kubectl describe node k8smaster | grep Taint 
    
    • 移除
    kubectl taint nodes k8smaster node-role.kubernetes.io/master:NoSchedule-
    
    • 安装完毕需要记住恢复 taint
    kubectl taint nodes k8smaster node-role.kubernetes.io/master=:NoSchedule
    

安装 OpenEBS

  1. 创建 OpenEBS 的 namespace

    kubectl create ns openebs
    
  2. 添加 helm 资源库

    helm repo add openebs https://openebs.github.io/charts
    helm repo update
    
  3. 安装 openebs

    helm install --namespace openebs --name openebs openebs/openebs --version 2.1.0
    

    安装完有提示:

    NAME:   openebs
    LAST DEPLOYED: Sun Sep 20 17:03:06 2020
    NAMESPACE: openebs
    STATUS: DEPLOYED
    ...
    Please note that, OpenEBS uses iSCSI for connecting applications with the
    OpenEBS Volumes and your nodes should have the iSCSI initiator installed.
    
    
  4. 设置默认 StorageClass

    kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
    
    
  5. 建立测试应用验证服务是否传教

相关文章

网友评论

      本文标题:k8s中安装openEBS

      本文链接:https://www.haomeiwen.com/subject/ibnpyktx.html