Skip to content

Instantly share code, notes, and snippets.

@bookshelfdave
Created July 24, 2018 20:06
Show Gist options
  • Select an option

  • Save bookshelfdave/ffadfaa81dbb8a52d8fd9b2ca2bf036d to your computer and use it in GitHub Desktop.

Select an option

Save bookshelfdave/ffadfaa81dbb8a52d8fd9b2ca2bf036d to your computer and use it in GitHub Desktop.
diff --git a/WORKSPACE b/WORKSPACE
index 27d4c6555..210b25337 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -7,7 +7,13 @@ http_archive(
sha256 = "f70c35a8c779bb92f7521ecb5a1c6604e9c3edd431e50b6376d7497abc8ad3c1",
)
-load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains", "go_download_sdk")
+http_archive(
+ name = "bazel_gazelle",
+ url = "https://github.com/bazelbuild/bazel-gazelle/releases/download/0.11.0/bazel-gazelle-0.11.0.tar.gz",
+ sha256 = "92a3c59734dad2ef85dc731dbcb2bc23c4568cded79d4b87ebccd787eb89e8d0",
+)
+
+load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
@@ -15,6 +21,10 @@ go_register_toolchains(
go_version = "1.9.3",
)
+load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
+
+gazelle_dependencies()
+
#=============================================================================
# Docker rules
diff --git a/cmd/kops/rollingupdatecluster.go b/cmd/kops/rollingupdatecluster.go
index d5f1d0e8e..d7bffb279 100644
--- a/cmd/kops/rollingupdatecluster.go
+++ b/cmd/kops/rollingupdatecluster.go
@@ -58,7 +58,7 @@ var (
validation.
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("kops update cluster --target=terraform --out=.") + ` then ` + pretty.Bash("terraform plan") + ` then
` + pretty.Bash("terraform apply") + ` prior to running ` + pretty.Bash("kops rolling-update cluster") + `.`))
rollingupdateExample = templates.Examples(i18n.T(`
@@ -66,7 +66,6 @@ var (
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.
kops rolling-update cluster --yes
# Roll the k8s-cluster.example.com kops cluster,
diff --git a/docs/upgrade.md b/docs/upgrade.md
index 935d4b5f6..104920cf3 100644
--- a/docs/upgrade.md
+++ b/docs/upgrade.md
@@ -4,14 +4,14 @@ Upgrading Kubernetes is easy with kops. The cluster spec contains a `KubernetesV
The `kops upgrade` command also automates checking for and applying updates.
-It is recommended to run the latest version of Kops to ensure compatibility with the target KubernetesVersion. When applying a Kubernetes minor version upgrade (e.g. `v1.5.3` to `v1.6.0`), you should confirm that the target KubernetesVersion is compatible with the [current Kops release](https://github.com/kubernetes/kops/releases).
+It is recommended to run the latest version of Kops to ensure compatibility with the target `kubernetesVersion`. When applying a Kubernetes minor version upgrade (e.g. `v1.5.3` to `v1.6.0`), you should confirm that the target `kubernetesVersion` is compatible with the [current Kops release](https://github.com/kubernetes/kops/releases).
Note: if you want to upgrade from a `kube-up` installation, please see the instructions for [how to upgrade kubernetes installed with kube-up](cluster_upgrades_and_migrations.md).
### Manual update
* `kops edit cluster $NAME`
-* set the KubernetesVersion to the target version (e.g. `v1.3.5`)
+* set the `kubernetesVersion` to the target version (e.g. `v1.3.5`)
* `kops update cluster $NAME` to preview, then `kops update cluster $NAME --yes`
* `kops rolling-update cluster $NAME` to preview, then `kops rolling-update cluster $NAME --yes`
@@ -31,9 +31,9 @@ Upgrade uses the latest Kubernetes version considered stable by kops, defined in
### Terraform Users
* `kops edit cluster $NAME`
-* set the KubernetesVersion to the target version (e.g. `v1.3.5`)
-* NOTE: The next 3 steps must all be ran in the same directory
-* `kops update cluster $NAME --target=terraform`
+* set `kubernetesVersion` to the target version (e.g. `1.8.11`)
+* NOTE: The next 3 steps must all be run in the same directory. This directory should also contain an existing `kubernetes.tf`.
+* `kops update cluster $NAME --target=terraform --out=.`
* `terraform plan`
* `terraform apply`
* `kops rolling-update cluster $NAME` to preview, then `kops rolling-update cluster $NAME --yes`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment