From 6050d90805192f2db0a74bced9b3f94ffcd7ef45 Mon Sep 17 00:00:00 2001 From: klaus993 Date: Tue, 13 Feb 2018 16:54:11 -0300 Subject: [PATCH 1/3] Add info about `kops create ig` command in docs --- docs/instance_groups.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/instance_groups.md b/docs/instance_groups.md index f0611806bb..b2be41d943 100644 --- a/docs/instance_groups.md +++ b/docs/instance_groups.md @@ -105,13 +105,16 @@ spec: ## Creating a new instance group -Suppose you want to add a new group of nodes, perhaps with a different instance type. You do this using -`kops create ig `. Currently it opens an editor with a skeleton configuration, allowing -you to edit it before creation. +Suppose you want to add a new group of nodes, perhaps with a different instance type. You do this using `kops create ig --subnet `. Currently the +`--subnet` flag is required, and it recieves the zone(s) of the subnet(s) in which the instance group will be. The command opens an editor with a skeleton configuration, allowing you to edit it before creation. So the procedure is: -* `kops create ig morenodes`, edit and save +* `kops create ig morenodes --subnet us-east-1a` + + or, in case you need it to be in more than one subnet, use a comma-separated list: + +* `kops create ig morenodes --subnet us-east-1a,us-east-1b,us-east-1c` * Preview: `kops update cluster ` * Apply: `kops update cluster --yes` * (no instances need to be relaunched, so no rolling-update is needed) From 43251fbb602c3aa52edaf096715e67a9feff1643 Mon Sep 17 00:00:00 2001 From: klaus993 Date: Tue, 13 Feb 2018 17:07:34 -0300 Subject: [PATCH 2/3] Change example in create ig --help Add another subnet to the first example to show how to pass multiple subnets. And run `make gen-cli-docs`. --- cmd/kops/create_ig.go | 2 +- docs/cli/kops_create_instancegroup.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kops/create_ig.go b/cmd/kops/create_ig.go index 300adbfce6..beadba7873 100644 --- a/cmd/kops/create_ig.go +++ b/cmd/kops/create_ig.go @@ -61,7 +61,7 @@ var ( # Create an instancegroup for the k8s-cluster.example.com cluster. kops create ig --name=k8s-cluster.example.com node-example \ - --role node --subnet my-subnet-name + --role node --subnet my-subnet-name,my-other-subnet-name # Create a YAML manifest for an instancegroup for the k8s-cluster.example.com cluster. kops create ig --name=k8s-cluster.example.com node-example \ diff --git a/docs/cli/kops_create_instancegroup.md b/docs/cli/kops_create_instancegroup.md index cdaddbd344..e38983433c 100644 --- a/docs/cli/kops_create_instancegroup.md +++ b/docs/cli/kops_create_instancegroup.md @@ -23,7 +23,7 @@ kops create instancegroup ``` # Create an instancegroup for the k8s-cluster.example.com cluster. kops create ig --name=k8s-cluster.example.com node-example \ - --role node --subnet my-subnet-name + --role node --subnet my-subnet-name,my-other-subnet-name # Create a YAML manifest for an instancegroup for the k8s-cluster.example.com cluster. kops create ig --name=k8s-cluster.example.com node-example \ From 4ea66239338e9677578234a6e2a1910896c0a2bb Mon Sep 17 00:00:00 2001 From: klaus993 Date: Tue, 13 Feb 2018 22:09:42 -0300 Subject: [PATCH 3/3] Add clarification in instance group deletion It can happen that, if one is accustomed to target the configuration to terraform (for example), one does not expect it to be applied automatically, but perform a `kops update cluster --target=terraform` followed by a `terraform apply`. It's a disruption of common flow and it should be clarified. --- cmd/kops/delete_instancegroup.go | 1 + docs/cli/kops_delete_instancegroup.md | 1 + docs/instance_groups.md | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/kops/delete_instancegroup.go b/cmd/kops/delete_instancegroup.go index e3fcf81883..6c6b72ab98 100644 --- a/cmd/kops/delete_instancegroup.go +++ b/cmd/kops/delete_instancegroup.go @@ -42,6 +42,7 @@ var ( # Delete an instancegroup for the k8s-cluster.example.com cluster. # The --yes option runs the command immediately. + # Note that the cloud resources will be deleted immediately, without running "kops update cluster" kops delete ig --name=k8s-cluster.example.com node-example --yes `)) diff --git a/docs/cli/kops_delete_instancegroup.md b/docs/cli/kops_delete_instancegroup.md index 252892d3f9..4eaaf25cfb 100644 --- a/docs/cli/kops_delete_instancegroup.md +++ b/docs/cli/kops_delete_instancegroup.md @@ -19,6 +19,7 @@ kops delete instancegroup ``` # Delete an instancegroup for the k8s-cluster.example.com cluster. # The --yes option runs the command immediately. + # Note that the cloud resources will be deleted immediately, without running "kops update cluster" kops delete ig --name=k8s-cluster.example.com node-example --yes ``` diff --git a/docs/instance_groups.md b/docs/instance_groups.md index b2be41d943..f5d4eeed51 100644 --- a/docs/instance_groups.md +++ b/docs/instance_groups.md @@ -203,8 +203,7 @@ If you decide you don't need an InstanceGroup any more, you delete it using: `ko Example: `kops delete ig morenodes` -No rolling-update is needed (and note this is not currently graceful, so there may be interruptions to -workloads where the pods are running on those nodes). +No `kops update cluster` nor `kops rolling-update` is needed, so **be careful** when deleting an instance group, your nodes will be deleted automatically (and note this is not currently graceful, so there may be interruptions to workloads where the pods are running on those nodes). ## EBS Volume Optimization