Skip to content

Commit

Permalink
docs(autok3s): update docs and flag descriptions for providers
Browse files Browse the repository at this point in the history
  • Loading branch information
JacieChao authored and Jason-ZW committed Mar 17, 2021
1 parent 1374430 commit cae68d7
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 52 deletions.
2 changes: 2 additions & 0 deletions docs/i18n/en_us/alibaba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ autok3s -d create \

### Enabling Alibaba Cloud Controller Manager(CCM)

Please check [here](https://github.com/kubernetes/cloud-provider-alibaba-cloud/blob/master/docs/getting-started.md) for more information about Aliyun Cloud Provider.

```bash
autok3s -d create \
... \
Expand Down
2 changes: 1 addition & 1 deletion docs/i18n/en_us/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ autok3s -d create \

### Enabling AWS Cloud Controller Manager(CCM)

Please check [this](https://kubernetes.github.io/cloud-provider-aws/prerequisites.html) to prepare IAM policies as prerequisites.
Please check [this](https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/prerequisites.md) to prepare IAM policies as prerequisites.

```bash
autok3s -d create -p aws \
Expand Down
2 changes: 1 addition & 1 deletion docs/i18n/en_us/tencent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ autok3s -d create -p tencent --name myk3s --master 3 --registry /etc/autok3s/reg

### Enable Tencent Cloud Controller Manager

You should create cluster route table if enabled CCM, and set `--router` with you router table name.
You should create cluster route table if enabled [CCM](https://github.com/TencentCloud/tencentcloud-cloud-controller-manager/blob/master/docs/getting-started.md), and set `--router` with you router table name.

Autok3s uses `10.42.0.0/16` as default cluster CIDR, your route table should set the same cidr-block.

Expand Down
2 changes: 2 additions & 0 deletions docs/i18n/zh_cn/alibaba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ autok3s -d create \

### 启用阿里云 CCM(Cloud Controller Manager)

更多关于Aliyun Cloud Provider信息,请点击[这里](https://github.com/kubernetes/cloud-provider-alibaba-cloud/blob/master/docs/getting-started.md)查看

```bash
autok3s -d create \
... \
Expand Down
2 changes: 1 addition & 1 deletion docs/i18n/zh_cn/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ configs:

### 启用 AWS CCM(Cloud Controller Manager)

如果您要使用 AWS CCM 功能需要提前准备好两个 IAM policies,以保证 CCM 功能的正常使用,具体内容请参考[这里](https://kubernetes.github.io/cloud-provider-aws/prerequisites.html)
如果您要使用 AWS CCM 功能需要提前准备好两个 IAM policies,以保证 CCM 功能的正常使用,具体内容请参考[这里](https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/prerequisites.md)

```bash
autok3s -d create -p aws \
Expand Down
2 changes: 1 addition & 1 deletion docs/i18n/zh_cn/tencent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ configs:

### 启用腾讯云 CCM(Cloud Controller Manager)

如果启用 CCM,您需要提前创建好集群路由表,以便 POD 可以通过 VPC 正常通信,并将路由表的名称通过`--router`参数传入。
如果启用 [CCM](https://github.com/TencentCloud/tencentcloud-cloud-controller-manager/blob/master/docs/getting-started.md),您需要提前创建好集群路由表,以便 POD 可以通过 VPC 正常通信,并将路由表的名称通过`--router`参数传入。

autok3s 默认使用的 cluster cidr 为`10.42.0.0/16`,您需要为该网段创建路由表。

Expand Down
18 changes: 9 additions & 9 deletions pkg/cluster/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ func (p *ProviderBase) GetCreateOptions() []types.Flag {
Name: "ui",
P: &p.UI,
V: p.UI,
Usage: "Enable K3s UI.",
Usage: "Enable K3s UI(kubernetes/dashboard). For how to login to UI, please see: https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md",
},
{
Name: "cluster",
P: &p.Cluster,
V: p.Cluster,
Usage: "Form k3s cluster using embedded etcd (requires K8s >= 1.19)",
Usage: "Form k3s cluster using embedded etcd (requires K8s >= 1.19), see: https://rancher.com/docs/k3s/latest/en/installation/ha-embedded/",
},
}
}
Expand All @@ -94,7 +94,7 @@ func (p *ProviderBase) GetClusterOptions() []types.Flag {
Name: "ip",
P: &p.IP,
V: p.IP,
Usage: "Public IP of an existing k3s server",
Usage: "IP for an existing k3s server",
},
{
Name: "k3s-version",
Expand All @@ -106,25 +106,25 @@ func (p *ProviderBase) GetClusterOptions() []types.Flag {
Name: "k3s-channel",
P: &p.K3sChannel,
V: p.K3sChannel,
Usage: "Used to specify the release channel of k3s. e.g.(stable, latest, or i.e. v1.18)",
Usage: "Channel to use for fetching K3s download URL. Defaults to “stable”. Options include: stable, latest, testing",
},
{
Name: "k3s-install-script",
P: &p.InstallScript,
V: p.InstallScript,
Usage: "Change the default upstream k3s install script address",
Usage: "Change the default upstream k3s install script address, see: https://rancher.com/docs/k3s/latest/en/installation/install-options/#options-for-installation-with-script",
},
{
Name: "master-extra-args",
P: &p.MasterExtraArgs,
V: p.MasterExtraArgs,
Usage: "Master extra arguments for k3s installer, wrapped in quotes. e.g.(--master-extra-args '--no-deploy metrics-server')",
Usage: "Master extra arguments for k3s installer, wrapped in quotes. e.g.(--master-extra-args '--no-deploy metrics-server'), for more information, please see: https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/",
},
{
Name: "worker-extra-args",
P: &p.WorkerExtraArgs,
V: p.WorkerExtraArgs,
Usage: "Worker extra arguments for k3s installer, wrapped in quotes. e.g.(--worker-extra-args '--node-taint key=value:NoExecute')",
Usage: "Worker extra arguments for k3s installer, wrapped in quotes. e.g.(--worker-extra-args '--node-taint key=value:NoExecute'), for more information, please see: https://rancher.com/docs/k3s/latest/en/installation/install-options/agent-config/",
},
{
Name: "registry",
Expand All @@ -136,13 +136,13 @@ func (p *ProviderBase) GetClusterOptions() []types.Flag {
Name: "datastore",
P: &p.DataStore,
V: p.DataStore,
Usage: "K3s datastore, HA mode `create/join` master node needed this flag",
Usage: "K3s datastore endpoint, Specify etcd, Mysql, Postgres, or Sqlite (default) data source name, see: https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#database",
},
{
Name: "token",
P: &p.Token,
V: p.Token,
Usage: "K3s master token, if empty will automatically generated",
Usage: "K3s token, if empty will automatically generated, see: https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#cluster-options",
},
{
Name: "master",
Expand Down
22 changes: 11 additions & 11 deletions pkg/providers/alibaba/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (p *Alibaba) GetCreateFlags() []types.Flag {
Name: "terway",
P: &p.Terway.Mode,
V: p.Terway.Mode,
Usage: "Enable terway CNI plugin, currently only support ENI mode. i.e.(--terway eni)",
Usage: "Enable terway CNI plugin, currently only support ENI mode. i.e.(--terway eni), see: https://github.com/AliyunContainerService/terway/blob/v1.0.10/docs/usage.md",
},
{
Name: "terway-max-pool-size",
Expand Down Expand Up @@ -207,35 +207,35 @@ func (p *Alibaba) sharedFlags() []types.Flag {
Name: "key-pair",
P: &p.KeyPair,
V: p.KeyPair,
Usage: "Used to connect to an instance",
Usage: "Used to connect to an instance, see: https://help.aliyun.com/document_detail/51792.html?spm=a2c4g.11186623.6.947.50d950c5Mr0XWg",
EnvVar: "ECS_SSH_KEYPAIR",
},
{
Name: "image",
P: &p.Image,
V: p.Image,
Usage: "Specify the image to be used by the instance",
Usage: "Specify the image to be used by the instance, see: https://help.aliyun.com/document_detail/25389.html?spm=a2c4g.11186623.6.764.5e063ebbsJtMNf",
EnvVar: "ECS_IMAGE_ID",
},
{
Name: "instance-type",
P: &p.InstanceType,
V: p.InstanceType,
Usage: "Specify the type of VM instance",
Usage: "Specify the type of VM instance, see: https://help.aliyun.com/document_detail/25378.html?spm=a2c4g.11186623.6.605.455c6da7QzI8xc",
EnvVar: "ECS_INSTANCE_TYPE",
},
{
Name: "v-switch",
P: &p.VSwitch,
V: p.VSwitch,
Usage: "Specify the vSwitch to be used by the instance",
Usage: "Specify the vSwitch to be used by the instance, see: https://help.aliyun.com/document_detail/100380.html?spm=a2c4g.11186623.6.563.733b103bRTApHj",
EnvVar: "ECS_VSWITCH_ID",
},
{
Name: "disk-category",
P: &p.DiskCategory,
V: p.DiskCategory,
Usage: "Specify the system disk category used by the instance",
Usage: "Specify the system disk category used by the instance, see: https://help.aliyun.com/document_detail/25383.htm?spm=a2c4g.11186623.2.8.24382763SzqaxO#concept-n1s-rzb-wdb",
EnvVar: "ECS_DISK_CATEGORY",
},
{
Expand All @@ -249,32 +249,32 @@ func (p *Alibaba) sharedFlags() []types.Flag {
Name: "security-group",
P: &p.SecurityGroup,
V: p.SecurityGroup,
Usage: "Specify the security group used by the instance",
Usage: "Specify the security group used by the instance, see: https://help.aliyun.com/document_detail/25387.html?spm=a2c4g.11186623.6.922.1f8d6c01V9Md8g",
EnvVar: "ECS_SECURITY_GROUP",
},
{
Name: "internet-max-bandwidth-out",
P: &p.InternetMaxBandwidthOut,
V: p.InternetMaxBandwidthOut,
Usage: "Specify the maximum out flow of the instance internet",
Usage: "Specify the maximum out flow of the instance internet, see: https://help.aliyun.com/document_detail/25412.htm?spm=a2c4g.11186623.2.8.21f4bb57lQgHgE#BandwidthQuota1",
},
{
Name: "eip",
P: &p.EIP,
V: p.EIP,
Usage: "Allocate EIP for instance",
Usage: "Allocate EIP for instance, see: https://help.aliyun.com/document_detail/113775.html?spm=a2c4g.11186623.6.974.39323647OLWuwe",
},
{
Name: "tags",
P: &p.Tags,
V: p.Tags,
Usage: "Set instance additional tags, i.e.(--tags a=b,b=c)",
Usage: "Set instance additional tags, i.e.(--tags a=b,b=c), see: https://help.aliyun.com/document_detail/25477.html?spm=a2c4g.11186623.6.1053.5fb621c6ENd1Hp",
},
{
Name: "cloud-controller-manager",
P: &p.CloudControllerManager,
V: p.CloudControllerManager,
Usage: "Enable cloud-controller-manager component",
Usage: "Enable cloud-controller-manager component, for more information, please check https://github.com/kubernetes/cloud-provider-alibaba-cloud/blob/master/docs/getting-started.md",
},
}

Expand Down
26 changes: 13 additions & 13 deletions pkg/providers/aws/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,42 +194,42 @@ func (p *Amazon) sharedFlags() []types.Flag {
Name: "keypair-name",
P: &p.KeypairName,
V: p.KeypairName,
Usage: "AWS keypair to use connect to instance",
Usage: "AWS keypair to use connect to instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html",
EnvVar: "AWS_KEYPAIR_NAME",
},
{
Name: "ami",
P: &p.AMI,
V: p.AMI,
Usage: "Used to specify the image to be used by the instance",
Usage: "Used to specify the image to be used by the instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html",
EnvVar: "AWS_AMI",
},
{
Name: "instance-type",
P: &p.InstanceType,
V: p.InstanceType,
Usage: "Specify the type of VM instance",
Usage: "Specify the type of VM instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html",
EnvVar: "AWS_INSTANCE_TYPE",
},
{
Name: "vpc-id",
P: &p.VpcID,
V: p.VpcID,
Usage: "AWS VPC id",
Usage: "AWS VPC id, using default vpc by default. see: https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html",
EnvVar: "AWS_VPC_ID",
},
{
Name: "subnet-id",
P: &p.SubnetID,
V: p.SubnetID,
Usage: "AWS VPC subnet id",
Usage: "AWS VPC subnet id, see: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html",
EnvVar: "AWS_SUBNET_ID",
},
{
Name: "volume-type",
P: &p.VolumeType,
V: p.VolumeType,
Usage: "Specify the EBS volume type",
Usage: "Specify the EBS volume type for root storage, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html",
EnvVar: "AWS_VOLUME_TYPE",
},
{
Expand All @@ -243,44 +243,44 @@ func (p *Amazon) sharedFlags() []types.Flag {
Name: "security-group",
P: &p.SecurityGroup,
V: p.SecurityGroup,
Usage: "Specify the security group used by the instance",
Usage: "Specify the security group used by the instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html",
EnvVar: "AWS_SECURITY_GROUP",
},
{
Name: "iam-instance-profile-control",
P: &p.IamInstanceProfileForControl,
V: p.IamInstanceProfileForControl,
Usage: "AWS IAM Instance Profile for k3s control nodes to deploy AWS Cloud Provider, must set with --cloud-controller-manager",
Usage: "AWS IAM Instance Profile for k3s control nodes to deploy AWS Cloud Provider, must set with --cloud-controller-manager, see: https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/prerequisites.md",
},
{
Name: "iam-instance-profile-worker",
P: &p.IamInstanceProfileForWorker,
V: p.IamInstanceProfileForWorker,
Usage: "AWS IAM Instance Profile for k3s worker nodes, must set with --cloud-controller-manager",
Usage: "AWS IAM Instance Profile for k3s worker nodes, must set with --cloud-controller-manager, see: https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/prerequisites.md",
},
{
Name: "request-spot-instance",
P: &p.RequestSpotInstance,
V: p.RequestSpotInstance,
Usage: "Request for spot instance",
Usage: "Request for spot instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html?icmpid=docs_ec2_console",
},
{
Name: "spot-price",
P: &p.SpotPrice,
V: p.SpotPrice,
Usage: "Spot instance bid price (in dollar)",
Usage: "Spot instance bid price (in dollar), see: https://aws.amazon.com/ec2/spot/pricing/",
},
{
Name: "tags",
P: &p.Tags,
V: p.Tags,
Usage: "Set instance additional tags, i.e.(--tags a=b,b=c)",
Usage: "Set instance additional tags, i.e.(--tags a=b,b=c), see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html",
},
{
Name: "cloud-controller-manager",
P: &p.CloudControllerManager,
V: p.CloudControllerManager,
Usage: "Enable cloud-controller-manager component",
Usage: "Enable cloud-controller-manager component, for more information, please check https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/getting_started.md",
},
}
}
Loading

0 comments on commit cae68d7

Please sign in to comment.