From 55d3c2ebfd14698e43c6c0fab5e7df81e6435bc1 Mon Sep 17 00:00:00 2001 From: Justin Sievenpiper Date: Wed, 3 Mar 2021 15:03:57 -0800 Subject: [PATCH 1/2] add documentation for cluster name via yml configuration --- site/content/docs/user/configuration.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/site/content/docs/user/configuration.md b/site/content/docs/user/configuration.md index 992bcef5d6..db89fe717f 100644 --- a/site/content/docs/user/configuration.md +++ b/site/content/docs/user/configuration.md @@ -42,6 +42,20 @@ The following high level options are available. NOTE: not all options are documented yet! We will fix this with time, PRs welcome! +### Name Your Cluster + +You can give your cluster a name by specifying it in your config: + +{{< codeFromInline lang="yaml" >}} +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +name: app-1-cluster +{{< /codeFromInline >}} + +This name will be used unless you invoke `kind create cluster` with the `--name` +option as well (for example `kind create cluster --config=config.yml --name other`), +in which case `other` will be used since CLI args take precedence. + ### Feature Gates Kubernetes [feature gates] can be enabled cluster-wide across all Kubernetes From bc8e4916cff83361b586a1303fb958f7b0fbeaf8 Mon Sep 17 00:00:00 2001 From: Justin Sievenpiper Date: Fri, 12 Mar 2021 15:23:19 -0800 Subject: [PATCH 2/2] higher-level doc on cli/config interaction --- site/content/docs/user/configuration.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/site/content/docs/user/configuration.md b/site/content/docs/user/configuration.md index db89fe717f..39f1098abb 100644 --- a/site/content/docs/user/configuration.md +++ b/site/content/docs/user/configuration.md @@ -36,6 +36,18 @@ To use this config, place the contents in a file `config.yaml` and then run You can also include a full file path like `kind create cluster --config=/foo/bar/config.yaml`. +### A Note On CLI Parameters and Configuration Files + +Unless otherwise noted, parameters passed to the CLI take precedence over their +equivalents in a config file. For example, if you invoke: + +{{< codeFromInline lang="bash" >}} +kind create cluster --name my-cluster +{{< /codeFromInline >}} + +The name `my-cluster` will be used regardless of the presence of that value in +your config file. + ## Cluster-Wide Options The following high level options are available. @@ -52,10 +64,6 @@ apiVersion: kind.x-k8s.io/v1alpha4 name: app-1-cluster {{< /codeFromInline >}} -This name will be used unless you invoke `kind create cluster` with the `--name` -option as well (for example `kind create cluster --config=config.yml --name other`), -in which case `other` will be used since CLI args take precedence. - ### Feature Gates Kubernetes [feature gates] can be enabled cluster-wide across all Kubernetes