美文网首页
2 部署 k8s 集群

2 部署 k8s 集群

作者: 天高s | 来源:发表于2021-03-16 00:13 被阅读0次

    在裸机上安装 KubeSphere

    git clone https://gitee.com/tiangao/kubekey

    cd kubekey
    ./build.sh -p

    export KKZONE=cn

    ./kk create config --with-kubesphere v3.0.0 --with-kubernetes v1.17.9

    apiVersion: kubekey.kubesphere.io/v1alpha1
    kind: Cluster
    metadata:
      name: sample
    spec:
      hosts:
      - {name: node1, address: 192.168.0.11, internalAddress: 192.168.0.11, user: ubuntu, password: Qcloud@123}
      - {name: node2, address: 192.168.0.12, internalAddress: 192.168.0.12, user: ubuntu, password: Qcloud@123}
      - {name: node2, address: 192.168.0.13, internalAddress: 192.168.0.13, user: ubuntu, password: Qcloud@123}
      roleGroups:
        etcd:
        - node1
        master:
        - node1
        worker:
        - node1
        - node2
        - node3
      controlPlaneEndpoint:
        domain: lb.kubesphere.local
        address: ""
        port: 6443
      kubernetes:
        version: v1.17.9
        imageRepo: kubesphere
        clusterName: cluster.local
      network:
        plugin: calico
        kubePodsCIDR: 10.233.64.0/18
        kubeServiceCIDR: 10.233.0.0/18
      registry:
        registryMirrors: []
        insecureRegistries: []
      addons: []
    
    
    ---
    apiVersion: installer.kubesphere.io/v1alpha1
    kind: ClusterConfiguration
    metadata:
      name: ks-installer
      namespace: kubesphere-system
      labels:
        version: v3.0.0
    spec:
      zone: ""
      local_registry: ""
      persistence:
        storageClass: ""
      authentication:
        jwtSecret: ""
      etcd:
        monitoring: true
        endpointIps: localhost
        port: 2379
        tlsEnable: true
      common:
        es:
          elasticsearchDataVolumeSize: 20Gi
          elasticsearchMasterVolumeSize: 4Gi
          elkPrefix: logstash
          logMaxAge: 7
        mysqlVolumeSize: 20Gi
        minioVolumeSize: 20Gi
        etcdVolumeSize: 20Gi
        openldapVolumeSize: 2Gi
        redisVolumSize: 2Gi
      console:
        enableMultiLogin: false  # enable/disable multi login
        port: 30880
      alerting:
        enabled: false
      auditing:
        enabled: false
      devops:
        enabled: false
        jenkinsMemoryLim: 2Gi
        jenkinsMemoryReq: 1500Mi
        jenkinsVolumeSize: 8Gi
        jenkinsJavaOpts_Xms: 512m
        jenkinsJavaOpts_Xmx: 512m
    

    相关文章

      网友评论

          本文标题:2 部署 k8s 集群

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