k3s 安装配置
安装
# 用于将 server 或 agent 加入集群的共享 secret
export K3S_TOKEN=foo.bar
# 指定 etcd、Mysql、Postgres 或 Sqlite(默认)数据源名称,同 `INSTALL_K3S_EXEC` 中 `--datastore-endpoint mysql://user:pwd@tcp(host:port)/schema`
export K3S_DATASTORE_ENDPOINT=mysql://user:pwd@tcp(host:port)/schema
# 允许写入 kubeconfig 文件,同 `INSTALL_K3S_EXEC` 中 `--write-kubeconfig-mode 644`
export K3S_KUBECONFIG_MODE=644
# 带有标志的命令,用于在服务中启动 K3s
export INSTALL_K3S_EXEC="--write-kubeconfig-mode 644 --datastore-endpoint mysql://user:pwd@tcp(host:port)/schema"