|
@@ -31,8 +31,6 @@ KUBE_INGRESS="${KUBE_INGRESS:-nginx}"
|
|
KUBE_MONITOR="${KUBE_MONITOR:-prometheus}"
|
|
KUBE_MONITOR="${KUBE_MONITOR:-prometheus}"
|
|
KUBE_STORAGE="${KUBE_STORAGE:-rook}"
|
|
KUBE_STORAGE="${KUBE_STORAGE:-rook}"
|
|
KUBE_LOG="${KUBE_LOG:-elasticsearch}"
|
|
KUBE_LOG="${KUBE_LOG:-elasticsearch}"
|
|
-KUBE_UI="${KUBE_UI:-dashboard}"
|
|
|
|
-KUBE_ADDON="${KUBE_ADDON:-metrics-server}"
|
|
|
|
KUBE_FLANNEL_TYPE="${KUBE_FLANNEL_TYPE:-vxlan}"
|
|
KUBE_FLANNEL_TYPE="${KUBE_FLANNEL_TYPE:-vxlan}"
|
|
KUBE_CRI="${KUBE_CRI:-docker}"
|
|
KUBE_CRI="${KUBE_CRI:-docker}"
|
|
KUBE_CRI_VERSION="${KUBE_CRI_VERSION:-latest}"
|
|
KUBE_CRI_VERSION="${KUBE_CRI_VERSION:-latest}"
|
|
@@ -2645,38 +2643,37 @@ Usage:
|
|
$(basename "$0") [command]
|
|
$(basename "$0") [command]
|
|
|
|
|
|
Available Commands:
|
|
Available Commands:
|
|
- init Init Kubernetes cluster.
|
|
|
|
- reset Reset Kubernetes cluster.
|
|
|
|
- add Add nodes to the cluster.
|
|
|
|
- del Remove node from the cluster.
|
|
|
|
- renew-cert Renew all available certificates.
|
|
|
|
- upgrade Upgrading kubeadm clusters.
|
|
|
|
- update Update script file.
|
|
|
|
|
|
+ init 初始化Kubernetes集群
|
|
|
|
+ reset 重置Kubernetes集群
|
|
|
|
+ add 将节点添加到群集
|
|
|
|
+ del 从群集中删除节点
|
|
|
|
+ renew-cert 续订所有可用的证书
|
|
|
|
+ upgrade 升级kubeadm集群
|
|
|
|
+ update 更新脚本文件
|
|
|
|
|
|
Flag:
|
|
Flag:
|
|
- -m,--master master node, default: ''
|
|
|
|
- -w,--worker work node, default: ''
|
|
|
|
- -u,--user ssh user, default: ${SSH_USER}
|
|
|
|
- -p,--password ssh password
|
|
|
|
- --private-key ssh private key
|
|
|
|
- -P,--port ssh port, default: ${SSH_PORT}
|
|
|
|
- -v,--version kube version, default: ${KUBE_VERSION}
|
|
|
|
- -n,--network cluster network, choose: [flannel,calico,cilium], default: ${KUBE_NETWORK}
|
|
|
|
- -i,--ingress ingress controller, choose: [nginx,traefik], default: ${KUBE_INGRESS}
|
|
|
|
- -ui,--ui cluster web ui, choose: [dashboard,kubesphere], default: ${KUBE_UI}
|
|
|
|
- -a,--addon cluster add-ons, choose: [metrics-server,nodelocaldns], default: ${KUBE_ADDON}
|
|
|
|
- -M,--monitor cluster monitor, choose: [prometheus]
|
|
|
|
- -l,--log cluster log, choose: [elasticsearch]
|
|
|
|
- -s,--storage cluster storage, choose: [rook,longhorn]
|
|
|
|
- --cri cri tools, choose: [docker,containerd,cri-o], default: ${KUBE_CRI}
|
|
|
|
- --cri-version cri version, default: ${KUBE_CRI_VERSION}
|
|
|
|
- --cri-endpoint cri endpoint, default: ${KUBE_CRI_ENDPOINT}
|
|
|
|
- -U,--upgrade-kernel upgrade kernel
|
|
|
|
- -of,--offline-file specify the offline package file to load
|
|
|
|
- --10years the certificate period is 10 years.
|
|
|
|
- --sudo sudo mode
|
|
|
|
- --sudo-user sudo user
|
|
|
|
- --sudo-password sudo user password
|
|
|
|
|
|
+ -m,--master master节点(逗号分隔), 默认: ''
|
|
|
|
+ -w,--worker work节点(逗号分隔), 默认: ''
|
|
|
|
+ -u,--user ssh用户, 默认: ${SSH_USER}
|
|
|
|
+ -p,--password ssh密码
|
|
|
|
+ --private-key ssh私钥
|
|
|
|
+ -P,--port ssh端口, 默认: ${SSH_PORT}
|
|
|
|
+ -v,--version kube版本, 默认: ${KUBE_VERSION}
|
|
|
|
+ -n,--network 群集网络, 选择: [flannel,calico,cilium], 默认: ${KUBE_NETWORK}
|
|
|
|
+ -i,--ingress ingress controller, choose: [nginx], 默认: ${KUBE_INGRESS}
|
|
|
|
+ -ui,--ui 群集web ui, use: [rancher]
|
|
|
|
+ -a,--addon 群集附加组件, use: []
|
|
|
|
+ -M,--monitor 群集监控, use: [prometheus]
|
|
|
|
+ -l,--log 群集日志, choose: [elasticsearch]
|
|
|
|
+ --cri cri tools, choose: [docker,containerd,cri-o], 默认: ${KUBE_CRI}
|
|
|
|
+ --cri-version cri version, 默认: ${KUBE_CRI_VERSION}
|
|
|
|
+ --cri-endpoint cri endpoint, 默认: ${KUBE_CRI_ENDPOINT}
|
|
|
|
+ -U,--upgrade-kernel 升级内核
|
|
|
|
+ -of,--offline-file 指定要加载的离线文件
|
|
|
|
+ --10years 证书期限为10年
|
|
|
|
+ --sudo sudo模式
|
|
|
|
+ --sudo-user sudo用户
|
|
|
|
+ --sudo-password sudo用户密码
|
|
|
|
|
|
Example:
|
|
Example:
|
|
[init cluster]
|
|
[init cluster]
|
|
@@ -2786,11 +2783,9 @@ while [ "${1:-}" != "" ]; do
|
|
;;
|
|
;;
|
|
-ui | --ui ) shift
|
|
-ui | --ui ) shift
|
|
UI_TAG=1
|
|
UI_TAG=1
|
|
- KUBE_UI=${1:-$KUBE_UI}
|
|
|
|
;;
|
|
;;
|
|
-a | --addon ) shift
|
|
-a | --addon ) shift
|
|
ADDON_TAG=1
|
|
ADDON_TAG=1
|
|
- KUBE_ADDON=${1:-$KUBE_ADDON}
|
|
|
|
;;
|
|
;;
|
|
--cri ) shift
|
|
--cri ) shift
|
|
KUBE_CRI=${1:-$KUBE_CRI}
|
|
KUBE_CRI=${1:-$KUBE_CRI}
|