kubesphere / kubekey

Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA 🔥 ⎈ 🐳
https://kubesphere.io
Apache License 2.0
2.18k stars 518 forks source link

离线安装的方式怎么采用nfs-client作为持久化存储 #2258

Open flyrun9527 opened 1 month ago

flyrun9527 commented 1 month ago

What is version of KubeKey has the issue?

3.1.1

What is your os environment?

centos7.9

KubeKey config file

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
  name: sample
spec:
  hosts:
  - {name: master, address: 192.168.2.103, internalAddress: 192.168.2.103, user: root, password: "123456"}
  roleGroups:
    etcd:
    - master
    control-plane: 
    - master
    worker:
    - master
  controlPlaneEndpoint:
    ## Internal loadbalancer for apiservers 
    # internalLoadbalancer: haproxy

    domain: lb.kubesphere.local
    address: ""
    port: 6443
  kubernetes:
    version: v1.23.15
    clusterName: cluster.local
    autoRenewCerts: true
    containerManager: docker
  etcd:
    type: kubekey
  network:
    plugin: calico
    kubePodsCIDR: 10.233.64.0/18
    kubeServiceCIDR: 10.233.0.0/18
    ## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
    multusCNI:
      enabled: false
  registry:
    privateRegistry: ""
    namespaceOverride: ""
    registryMirrors: []
    insecureRegistries: []
  addons: 
  - name: nfs-client
    namespace: kube-system
    sources:
      chart:
        name: nfs-client-provisioner
        repo: https://charts.kubesphere.io/main # https://charts.kubesphere.io/main
        # valuesFile: /home/KubeKey/nfs-client.yaml # Use the path of your own NFS-client configuration file.
        # values also supports parameter lists
        values:
         - storageClass.defaultClass=true
         - nfs.server=192.168.2.103
         - nfs.path=/home/nfs/dynamic-provisioner

A clear and concise description of what happend.

其中配置项 addons sources chart repo 我不知道如何配置才可以离线安装 配置nfs 必须要自己安装nfs动态存储吗

Relevant log output

No response

Additional information

No response

flyrun9527 commented 1 month ago

没事了 翻源码发现有个path配置 加入 path: ./helm-charts/src/main 就可以咯