zoukankan      html  css  js  c++  java
  • Centos7.7下KubeSphere最小化安装和定制化配置安装

    前置环境

    安装helm和tiller

    前提k8s集群已经搭建好

    get_helm.sh

    sh get_helm.sh
    
    vi helm_rbac.yaml
    
    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: tiller
      namespace: kube-system
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: tiller
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: cluster-admin
    subjects:
      - kind: ServiceAccount
        name: tiller
        namespace: kube-system
      
    kubectl apply -f helm_rbac.yaml
    

    image-20201210202527235

    初始化:

    helm init --service-account=tiller --tiller-image=sapcc/tiller:v2.16.3 --history-max 300
    

    image-20201210172259509

    是否安装成功的验证

    kubectl get pods --all-namespaces
    

    image-20201210200121548

    如果安装失败,删除重新安装

    kubectl get -n kube-system secrets,sa,clusterrolebinding -o name|grep tiller|xargs kubectl -n kube-system delete
    kubectl get all -n kube-system -l app=helm -o name|xargs kubectl delete -n kube-system
    

    version:

    helm version
    

    image-20201210202809079

    如果发现client和service的版本不一致,执行下面命令保证版本相同

    helm init --upgrade
    

    image-20201210202910051

    确认master是否有污点

    kubectl describe node k8s-node1 | grep Taint
    

    image-20201210193404216

    去除污点

    kubectl taint nodes k8s-node1 node-role.kubernetes.io/master:NoSchedule-
    

    image-20201210193618009

    安装OpenEBS

    kubectl create ns openebs
    helm install --namespace openebs --name openebs stable/openebs --version 1.5.0
    kubectl get pods --all-namespaces
    

    image-20201210203745443

    等待几分钟,创建完毕

    集群已有存储类型(StorageClass),执行 kubectl get sc看下当前是否设置了默认的 storageclass

    image-20201210203846630

    将openebs-hostpath设置为默认的storageClass

    kubectl patch storageclass openebs-hostpath -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
    

    修改完成后,我们就可以看到openebs-hostpath被设置为默认storageClass

    image-20201210204401127

    最小化安装

    kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yaml
    kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml
    kubectl get pods --all-namespaces
    ## 等待ks-installer安装完毕
    

    image-20201210220606996

    kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
    

    等待一段时间(网速慢的话可能要十来分钟),直到出现kubesphere控制台:

    image-20201210222026037

    访问console,输入出现的account和password,进入首页,至此安装成功。

    image-20201210222113865

    页面还是蛮炫酷的。

    image-20201210222429885

    定制化安装

    点击自定义资源CRD

    image-20201211095514139

    搜索clusterconfiguration 并点击

    image-20201211095536208

    点击这三个点,就可以编辑了。

    image-20201211095622342

    这里我开启devops,openpitrix,alerting,notification,相对应的只需要把false改成true就行了

    image-20201211104006650

    然后点击更新,大概等待二十分钟(跟网速和硬件配置有关)

    image-20201211104145644

  • 相关阅读:
    模版继承
    用一个指向int的指针来存储一个对象的地址。
    mysql 增 删 改 查
    虚函数背后的秘密2
    二叉树的应用—最优二叉树(哈夫曼树)
    虚函数
    经典贪心,哈夫曼编码。
    以下代码有什么问题?
    前缀运算和后缀运算
    虚函数背后的秘密
  • 原文地址:https://www.cnblogs.com/wwjj4811/p/14117876.html
Copyright © 2011-2022 走看看