Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc updates to clarify and fix typos in rolling-update cmd. #3458

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 21 additions & 22 deletions cmd/kops/rollingupdatecluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,52 +43,51 @@ import (

var (
rollingupdate_long = pretty.LongDesc(i18n.T(`
This command updates a kubernetes cluster to match the cloud, and kops specifications.
This command updates a kubernetes cluster to match the cloud and kops specifications.

To perform rolling update, you need to update the cloud resources first with the command
To perform a rolling update, you need to update the cloud resources first with the command
` + pretty.Bash("kops update cluster") + `.

If rolling-update does not report that the cluster needs to be rolled you can force the cluster to be
If rolling-update does not report that the cluster needs to be rolled, you can force the cluster to be
rolled with the force flag. Rolling update drains and validates the cluster by default. A cluster is
deemed validated when all required nodes are running, and all pods in the kube-system namespace are operational.
When a node is deleted rolling-update sleeps the interval for the node type, and the tries for the same period
of time for the cluster to be validated. For instance setting --master-interval=3m causes rolling-update
to wait for 3m after a master is rolled, and another 3m for the cluster to stabilize and pass
deemed validated when all required nodes are running and all pods in the kube-system namespace are operational.
When a node is deleted, rolling-update sleeps the interval for the node type, and then tries for the same period
of time for the cluster to be validated. For instance, setting --master-interval=3m causes rolling-update
to wait for 3 minutes after a master is rolled, and another 3 minutes for the cluster to stabilize and pass
validation.

Note: terraform users will need run the following commands all from the same directory
` + pretty.Bash("kops update cluster --target=terraform") + `then
` + pretty.Bash("terraform plan") + ` then ` + pretty.Bash("terraform apply") +
`prior to running` + pretty.Bash("kops rolling-update cluster") + `.`))
Note: terraform users will need to run all of the following commands from the same directory
` + pretty.Bash("kops update cluster --target=terraform") + ` then ` + pretty.Bash("terraform plan") + ` then
` + pretty.Bash("terraform apply") + ` prior to running ` + pretty.Bash("kops rolling-update cluster") + `.`))

rollingupdate_example = templates.Examples(i18n.T(`
# Preview a rolling-update
# Preview a rolling-update.
kops rolling-update cluster

# Roll the currently selected kops cluster with defaults.
# Nodes will be drained and the cluster will be validated between node replacement
# Nodes will be drained and the cluster will be validated between node replacement.
kops rolling-update cluster --yes

# Roll the k8s-cluster.example.com kops cluster
# do not fail if the cluster does not validate
# wait 8 min to create new node, and at least 8 min
# to validate the cluster.
# Roll the k8s-cluster.example.com kops cluster,
# do not fail if the cluster does not validate,
# wait 8 min to create new node, and wait at least
# 8 min to validate the cluster.
kops rolling-update cluster k8s-cluster.example.com --yes \
--fail-on-validate-error="false" \
--master-interval=8m \
--node-interval=8m

# Roll the k8s-cluster.example.com kops cluster
# Roll the k8s-cluster.example.com kops cluster,
# do not validate the cluster because of the cloudonly flag.
# Force the entire cluster to roll, even if rolling update
# reports that the cluster does not need to be rolled.
kops rolling-update cluster k8s-cluster.example.com --yes \
--cloudonly \
--force

# Roll the k8s-cluster.example.com kops cluster
# only roll the node instancegroup
# use the new drain an validate functionality
# Roll the k8s-cluster.example.com kops cluster,
# only roll the node instancegroup,
# use the new drain an validate functionality.
kops rolling-update cluster k8s-cluster.example.com --yes \
--fail-on-validate-error="false" \
--node-interval 8m \
Expand Down Expand Up @@ -123,7 +122,7 @@ type RollingUpdateOptions struct {
ClusterName string

// InstanceGroups is the list of instance groups to rolling-update;
// if not specified all instance groups will be updated
// if not specified, all instance groups will be updated
InstanceGroups []string
}

Expand Down
40 changes: 20 additions & 20 deletions docs/cli/kops_rolling-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,53 @@ Rolling update a cluster.
### Synopsis


This command updates a kubernetes cluster to match the cloud, and kops specifications.
This command updates a kubernetes cluster to match the cloud and kops specifications.

To perform rolling update, you need to update the cloud resources first with the command
To perform a rolling update, you need to update the cloud resources first with the command
`kops update cluster`.

If rolling-update does not report that the cluster needs to be rolled you can force the cluster to be
If rolling-update does not report that the cluster needs to be rolled, you can force the cluster to be
rolled with the force flag. Rolling update drains and validates the cluster by default. A cluster is
deemed validated when all required nodes are running, and all pods in the kube-system namespace are operational.
When a node is deleted rolling-update sleeps the interval for the node type, and the tries for the same period
of time for the cluster to be validated. For instance setting --master-interval=3m causes rolling-update
to wait for 3m after a master is rolled, and another 3m for the cluster to stabilize and pass
deemed validated when all required nodes are running and all pods in the kube-system namespace are operational.
When a node is deleted, rolling-update sleeps the interval for the node type, and then tries for the same period
of time for the cluster to be validated. For instance, setting --master-interval=3m causes rolling-update
to wait for 3 minutes after a master is rolled, and another 3 minutes for the cluster to stabilize and pass
validation.

Note: terraform users will need run the following commands all from the same directory
`kops update cluster --target=terraform`then
`terraform plan` then `terraform apply`prior to running`kops rolling-update cluster`.
Note: terraform users will need to run all of the following commands from the same directory
`kops update cluster --target=terraform` then `terraform plan` then
`terraform apply` prior to running `kops rolling-update cluster`.

### Examples

```
# Preview a rolling-update
# Preview a rolling-update.
kops rolling-update cluster

# Roll the currently selected kops cluster with defaults.
# Nodes will be drained and the cluster will be validated between node replacement
# Nodes will be drained and the cluster will be validated between node replacement.
kops rolling-update cluster --yes

# Roll the k8s-cluster.example.com kops cluster
# do not fail if the cluster does not validate
# wait 8 min to create new node, and at least 8 min
# to validate the cluster.
# Roll the k8s-cluster.example.com kops cluster,
# do not fail if the cluster does not validate,
# wait 8 min to create new node, and wait at least
# 8 min to validate the cluster.
kops rolling-update cluster k8s-cluster.example.com --yes \
--fail-on-validate-error="false" \
--master-interval=8m \
--node-interval=8m

# Roll the k8s-cluster.example.com kops cluster
# Roll the k8s-cluster.example.com kops cluster,
# do not validate the cluster because of the cloudonly flag.
# Force the entire cluster to roll, even if rolling update
# reports that the cluster does not need to be rolled.
kops rolling-update cluster k8s-cluster.example.com --yes \
--cloudonly \
--force

# Roll the k8s-cluster.example.com kops cluster
# only roll the node instancegroup
# use the new drain an validate functionality
# Roll the k8s-cluster.example.com kops cluster,
# only roll the node instancegroup,
# use the new drain an validate functionality.
kops rolling-update cluster k8s-cluster.example.com --yes \
--fail-on-validate-error="false" \
--node-interval 8m \
Expand Down
40 changes: 20 additions & 20 deletions docs/cli/kops_rolling-update_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ Rolling update a cluster.
### Synopsis


This command updates a kubernetes cluster to match the cloud, and kops specifications.
This command updates a kubernetes cluster to match the cloud and kops specifications.

To perform rolling update, you need to update the cloud resources first with the command
To perform a rolling update, you need to update the cloud resources first with the command
`kops update cluster`.

If rolling-update does not report that the cluster needs to be rolled you can force the cluster to be
If rolling-update does not report that the cluster needs to be rolled, you can force the cluster to be
rolled with the force flag. Rolling update drains and validates the cluster by default. A cluster is
deemed validated when all required nodes are running, and all pods in the kube-system namespace are operational.
When a node is deleted rolling-update sleeps the interval for the node type, and the tries for the same period
of time for the cluster to be validated. For instance setting --master-interval=3m causes rolling-update
to wait for 3m after a master is rolled, and another 3m for the cluster to stabilize and pass
deemed validated when all required nodes are running and all pods in the kube-system namespace are operational.
When a node is deleted, rolling-update sleeps the interval for the node type, and then tries for the same period
of time for the cluster to be validated. For instance, setting --master-interval=3m causes rolling-update
to wait for 3 minutes after a master is rolled, and another 3 minutes for the cluster to stabilize and pass
validation.

Note: terraform users will need run the following commands all from the same directory
`kops update cluster --target=terraform`then
`terraform plan` then `terraform apply`prior to running`kops rolling-update cluster`.
Note: terraform users will need to run all of the following commands from the same directory
`kops update cluster --target=terraform` then `terraform plan` then
`terraform apply` prior to running `kops rolling-update cluster`.

```
kops rolling-update cluster
Expand All @@ -32,33 +32,33 @@ kops rolling-update cluster
### Examples

```
# Preview a rolling-update
# Preview a rolling-update.
kops rolling-update cluster

# Roll the currently selected kops cluster with defaults.
# Nodes will be drained and the cluster will be validated between node replacement
# Nodes will be drained and the cluster will be validated between node replacement.
kops rolling-update cluster --yes

# Roll the k8s-cluster.example.com kops cluster
# do not fail if the cluster does not validate
# wait 8 min to create new node, and at least 8 min
# to validate the cluster.
# Roll the k8s-cluster.example.com kops cluster,
# do not fail if the cluster does not validate,
# wait 8 min to create new node, and wait at least
# 8 min to validate the cluster.
kops rolling-update cluster k8s-cluster.example.com --yes \
--fail-on-validate-error="false" \
--master-interval=8m \
--node-interval=8m

# Roll the k8s-cluster.example.com kops cluster
# Roll the k8s-cluster.example.com kops cluster,
# do not validate the cluster because of the cloudonly flag.
# Force the entire cluster to roll, even if rolling update
# reports that the cluster does not need to be rolled.
kops rolling-update cluster k8s-cluster.example.com --yes \
--cloudonly \
--force

# Roll the k8s-cluster.example.com kops cluster
# only roll the node instancegroup
# use the new drain an validate functionality
# Roll the k8s-cluster.example.com kops cluster,
# only roll the node instancegroup,
# use the new drain an validate functionality.
kops rolling-update cluster k8s-cluster.example.com --yes \
--fail-on-validate-error="false" \
--node-interval 8m \
Expand Down