diff --git a/README.md b/README.md index a45c3117..80ac8792 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,6 @@ You can also use it to join hosts as agents to the K3s cluster. It will automati Then user can use `autok3s kubectl` command quickly access the cluster. Use [viper](https://github.com/spf13/viper) to bind flags and configuration file. `autok3s` will generate a configuration file to store cloud-providers' access information at the specified location(`/var/lib/rancher/autok3s/config.yaml`) to reduce the number of flags to be passed for multiple runs. -``` -autok3s: - providers: - alibaba: - access-key: - access-secret: -``` It's also generated a state file `/var/lib/rancher/autok3s/.state` to record the clusters' information created on this host. @@ -31,12 +24,12 @@ The user can get the commands available for different providers according to the ### Setup K3s Cluster If already have access information in `/var/lib/rancher/autok3s/config.yaml` you can use the simplified command. ``` -sudo autok3s create --provider alibaba --region --name --key-pair --v-switch --security-group --ssh-key-path +sudo autok3s create --provider alibaba --region --name --key-pair --v-switch --security-group --ssh-key-path --master 1 ``` Generic commands can be used anywhere. ``` -sudo autok3s create --provider alibaba --region --name --key-pair --v-switch --security-group --ssh-key-path --access-key --access-secret +sudo autok3s create --provider alibaba --region --name --key-pair --v-switch --security-group --ssh-key-path --access-key --access-secret --master 1 ``` HA mode need `--master` greater than 1, also need to specify `--datastore` e.g. @@ -47,12 +40,12 @@ HA mode need `--master` greater than 1, also need to specify `--datastore` e.g. ### Join K3s Nodes If you have ever created a cluster using `autok3s` on your current machine, you can use the simplified command. ``` -sudo autok3s join --provider alibaba --region --name --ssh-key-path +sudo autok3s join --provider alibaba --region --name --ssh-key-path --worker 1 ``` Generic commands can be used anywhere. ``` -sudo autok3s join --provider alibaba --region --name --key-pair --v-switch --security-group --token --url +sudo autok3s join --provider alibaba --region --name --key-pair --v-switch --security-group --token --url --worker 1 ``` HA mode need `--master` greater than 0, also need to specify `--datastore` e.g. diff --git a/pkg/providers/alibaba/alibaba.go b/pkg/providers/alibaba/alibaba.go index 2f0baa5d..b5c49a7f 100644 --- a/pkg/providers/alibaba/alibaba.go +++ b/pkg/providers/alibaba/alibaba.go @@ -30,8 +30,8 @@ const ( internetMaxBandwidthOut = "50" diskCategory = "cloud_ssd" diskSize = "40" - master = "1" - worker = "1" + master = "0" + worker = "0" ui = "none" repo = "https://apphub.aliyuncs.com" terway = "none"