Skip to content

Commit 2fa4c11

Browse files
committed
remove the useless guide
1 parent 2268b21 commit 2fa4c11

File tree

2 files changed

+40
-54
lines changed

2 files changed

+40
-54
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
IMPROVEMENTS:
55

6+
- remove the useless guide [GH-4](https://github.com/terraform-alicloud-modules/terraform-alicloud-managed-kubernetes/pull/4)
67
- support to create a new vpc and improve this module [GH-3](https://github.com/terraform-alicloud-modules/terraform-alicloud-managed-kubernetes/pull/3)
78
- add managed kubernetes module [GH-1](https://github.com/terraform-alicloud-modules/terraform-alicloud-managed-kubernetes/pull/1)
89

README.md

Lines changed: 39 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -14,68 +14,53 @@ These types of the module resource are supported:
1414
- [SLS Project](https://www.terraform.io/docs/providers/alicloud/r/log_project.html)
1515
- [Managed Kubernetes](https://www.terraform.io/docs/providers/alicloud/r/cs_managed_kubernetes.html)
1616

17-
Usage
18-
-----
19-
This example can specify the following arguments to create user-defined kuberntes cluster
20-
21-
* alicloud_access_key: The Alicloud Access Key ID
22-
* alicloud_secret_key: The Alicloud Access Secret Key
23-
* region: The ID of region in which launching resources
24-
* k8s_name_prefix: The name prefix of kubernetes cluster
25-
* worker_number: The number of worker nodes in each kubernetes cluster
26-
* k8s_pod_cidr: The kubernetes pod cidr block. It cannot be equals to vpc's or vswitch's and cannot be in them.
27-
* k8s_service_cidr: The kubernetes service cidr block. Its setting rule is same as `k8s_pod_cidr`
28-
* Other kubernetes cluster arguments
29-
3017
Usage
3118
-----
3219

3320
This module used to create a managed kubernetes and it can meet several scenarios by specifying different parameters.
3421

35-
1. Create a new vpc, several new vswitches and a new nat gateway for the cluster.
36-
```hcl
37-
// Create a scaling group using autoscaling module at first.
38-
module "managed-k8s" {
39-
source = "terraform-alicloud-modules/managed-kubernetes/alicloud"
40-
profile = "Your-profile-name"
41-
42-
k8s_name_prefix = "my-managed-k8s-with-new-vpc"
43-
new_vpc = true
44-
vpc_cidr = "192.168.0.0/16"
45-
vswitch_cidrs = [
46-
"192.168.1.0/24",
47-
"192.168.2.0/24",
48-
"192.168.3.0/24",
49-
"192.168.4.0/24",
50-
]
51-
}
52-
```
22+
**NOTE:** This module using AccessKey and SecretKey are from `profile` and `shared_credentials_file`.
23+
If you have not set them yet, please install [aliyun-cli](https://github.com/aliyun/aliyun-cli#installation) and configure it.
5324

54-
In this scenario, the module will create a new vpc with `vpc_cidr`, several vswitches with `vswitch_cidrs`, a new nat gateway,
55-
a new EIP with `new_eip_bandwidth` and several snat entries for vswitches.
25+
### 1 Create a new vpc, several new vswitches and a new nat gateway for the cluster.
26+
```hcl
27+
// Create a scaling group using autoscaling module at first.
28+
module "managed-k8s" {
29+
source = "terraform-alicloud-modules/managed-kubernetes/alicloud"
30+
profile = "Your-profile-name"
5631
57-
1. Using existing vpc and vswitches by specifying `vswitch_ids`. Setting `new_nat_gateway=true` to add a new nat gateway in the vswitches' vpc.
58-
```hcl
59-
// Create a scaling group using autoscaling module at first.
60-
module "managed-k8s" {
61-
source = "terraform-alicloud-modules/managed-kubernetes/alicloud"
62-
profile = "Your-profile-name"
63-
64-
k8s_name_prefix = "my-managed-k8s-with-new-vpc"
65-
new_vpc = false
66-
vswitch_ids = [
67-
"vsw-12345678",
68-
"vsw-09876537"
69-
]
70-
new_nat_gateway = true
71-
}
72-
```
73-
74-
In this scenario, if setting `new_nat_gateway=false`, you should ensure the specified vswitches can access internet.
75-
In other words, the specified vpc has a nat gateway and there are several snat entries to bind the vswitches and a EIP.
32+
k8s_name_prefix = "my-managed-k8s-with-new-vpc"
33+
new_vpc = true
34+
vpc_cidr = "192.168.0.0/16"
35+
vswitch_cidrs = [
36+
"192.168.1.0/24",
37+
"192.168.2.0/24",
38+
"192.168.3.0/24",
39+
"192.168.4.0/24",
40+
]
41+
}
42+
```
43+
In this scenario, the module will create a new vpc with `vpc_cidr`, several vswitches with `vswitch_cidrs`, a new nat gateway,
44+
a new EIP with `new_eip_bandwidth` and several snat entries for vswitches.
7645

77-
**NOTE:** This module using AccessKey and SecretKey are from `profile` and `shared_credentials_file`.
78-
If you have not set them yet, please install [aliyun-cli](https://github.com/aliyun/aliyun-cli#installation) and configure it.
46+
### 2 Using existing vpc and vswitches by specifying `vswitch_ids`. Setting `new_nat_gateway=true` to add a new nat gateway in the vswitches' vpc.
47+
```hcl
48+
// Create a scaling group using autoscaling module at first.
49+
module "managed-k8s" {
50+
source = "terraform-alicloud-modules/managed-kubernetes/alicloud"
51+
profile = "Your-profile-name"
52+
53+
k8s_name_prefix = "my-managed-k8s-with-new-vpc"
54+
new_vpc = false
55+
vswitch_ids = [
56+
"vsw-12345678",
57+
"vsw-09876537"
58+
]
59+
new_nat_gateway = true
60+
}
61+
```
62+
In this scenario, if setting `new_nat_gateway=false`, you should ensure the specified vswitches can access internet.
63+
In other words, the specified vpc has a nat gateway and there are several snat entries to bind the vswitches and a EIP.
7964

8065
## Conditional creation
8166

0 commit comments

Comments
 (0)