From 6e6c1f89208f62e68485d7614a6891f74bb1d8b8 Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Fri, 9 Jul 2021 12:54:18 +0800 Subject: [PATCH 1/2] Redirect kubeadm config reference Instead of redirecting users to the godoc site for kubeadm configuration options, we'd better point them to the generated reference. --- .../setup-tools/kubeadm/kubeadm-init-phase.md | 2 +- .../setup-tools/kubeadm/kubeadm-init.md | 4 ++-- .../setup-tools/kubeadm/kubeadm-join.md | 4 ++-- .../tools/kubeadm/control-plane-flags.md | 2 +- .../tools/kubeadm/dual-stack-support.md | 17 +++++++++++++---- .../tools/kubeadm/high-availability.md | 2 +- .../tools/kubeadm/troubleshooting-kubeadm.md | 11 ++++++++--- .../administer-cluster/kubeadm/kubeadm-certs.md | 2 +- 8 files changed, 29 insertions(+), 15 deletions(-) diff --git a/content/en/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md b/content/en/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md index 2b6939bac6..4cb7ff351f 100644 --- a/content/en/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md +++ b/content/en/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md @@ -144,7 +144,7 @@ install them selectively. {{< /tabs >}} For more details on each field in the `v1beta2` configuration you can navigate to our -[API reference pages.] (https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) +[API reference pages.] (/docs/reference/config-api/kubeadm-config.v1beta2/) ## {{% heading "whatsnext" %}} diff --git a/content/en/docs/reference/setup-tools/kubeadm/kubeadm-init.md b/content/en/docs/reference/setup-tools/kubeadm/kubeadm-init.md index 2260c2ca22..9c0eabedd5 100644 --- a/content/en/docs/reference/setup-tools/kubeadm/kubeadm-init.md +++ b/content/en/docs/reference/setup-tools/kubeadm/kubeadm-init.md @@ -122,8 +122,8 @@ The default configuration can be printed out using the If your configuration is not using the latest version it is **recommended** that you migrate using the [kubeadm config migrate](/docs/reference/setup-tools/kubeadm/kubeadm-config/) command. -For more information on the fields and usage of the configuration you can navigate to our API reference -page and pick a version from [the list](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#section-directories). +For more information on the fields and usage of the configuration you can navigate to our +[API reference page](/docs/reference/config-api/kubeadm-config.v1beta2/). ### Adding kube-proxy parameters {#kube-proxy} diff --git a/content/en/docs/reference/setup-tools/kubeadm/kubeadm-join.md b/content/en/docs/reference/setup-tools/kubeadm/kubeadm-join.md index 53ca4a789b..ead51c1405 100644 --- a/content/en/docs/reference/setup-tools/kubeadm/kubeadm-join.md +++ b/content/en/docs/reference/setup-tools/kubeadm/kubeadm-join.md @@ -282,8 +282,8 @@ The default configuration can be printed out using the If your configuration is not using the latest version it is **recommended** that you migrate using the [kubeadm config migrate](/docs/reference/setup-tools/kubeadm/kubeadm-config/) command. -For more information on the fields and usage of the configuration you can navigate to our API reference -page and pick a version from [the list](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#pkg-subdirectories). +For more information on the fields and usage of the configuration you can navigate to our +[API reference](/docs/reference/config-api/kubeadm-config.v1beta2/). ## {{% heading "whatsnext" %}} diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md b/content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md index 8a9828a7ad..df1ebcd91c 100644 --- a/content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md +++ b/content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md @@ -24,7 +24,7 @@ The `extraArgs` field consist of `key: value` pairs. To override a flag for a co 3. Run `kubeadm init` with `--config `. For more details on each field in the configuration you can navigate to our -[API reference pages](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2#ClusterConfiguration). +[API reference pages](/docs/reference/config-api/kubeadm-config.v1beta2/). {{< note >}} You can generate a `ClusterConfiguration` object with default values by running `kubeadm config print init-defaults` and saving the output to a file of your choice. diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md b/content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md index 767787179c..b26158eb5a 100644 --- a/content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md +++ b/content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md @@ -45,7 +45,9 @@ similar to the following example: kubeadm init --pod-network-cidr=10.244.0.0/16,2001:db8:42:0::/56 --service-cidr=10.96.0.0/16,2001:db8:42:1::/112 ``` -To make things clearer, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) `kubeadm-config.yaml` for the primary dual-stack control plane node. +To make things clearer, here is an example kubeadm +[configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/) `kubeadm-config.yaml` +for the primary dual-stack control plane node. ```yaml --- @@ -85,7 +87,8 @@ The `--apiserver-advertise-address` flag does not support dual-stack. Before joining a node, make sure that the node has IPv6 routable network interface and allows IPv6 forwarding. -Here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) `kubeadm-config.yaml` for joining a worker node to the cluster. +Here is an example kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/) +`kubeadm-config.yaml` for joining a worker node to the cluster. ```yaml apiVersion: kubeadm.k8s.io/v1beta2 @@ -98,7 +101,9 @@ nodeRegistration: node-ip: 10.100.0.3,fd00:1:2:3::3 ``` -Also, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) `kubeadm-config.yaml` for joining another control plane node to the cluster. +Also, here is an example kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/) +`kubeadm-config.yaml` for joining another control plane node to the cluster. + ```yaml apiVersion: kubeadm.k8s.io/v1beta2 kind: JoinConfiguration @@ -134,7 +139,9 @@ In 1.21 the `IPv6DualStack` feature is Beta and the feature gate is defaulted to kubeadm init --feature-gates IPv6DualStack=false ``` -To make things more clear, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) `kubeadm-config.yaml` for the single-stack control plane node. +To make things more clear, here is an example kubeadm +[configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/) +`kubeadm-config.yaml` for the single-stack control plane node. ```yaml apiVersion: kubeadm.k8s.io/v1beta2 @@ -150,3 +157,5 @@ networking: * [Validate IPv4/IPv6 dual-stack](/docs/tasks/network/validate-dual-stack) networking * Read about [Dual-stack](/docs/concepts/services-networking/dual-stack/) cluster networking +* Learn more about the kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/) + diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/high-availability.md b/content/en/docs/setup/production-environment/tools/kubeadm/high-availability.md index e387e2d41c..83438bf788 100644 --- a/content/en/docs/setup/production-environment/tools/kubeadm/high-availability.md +++ b/content/en/docs/setup/production-environment/tools/kubeadm/high-availability.md @@ -115,7 +115,7 @@ option. Your cluster requirements may need a different configuration. {{< note >}} The `kubeadm init` flags `--config` and `--certificate-key` cannot be mixed, therefore if you want - to use the [kubeadm configuration](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) + to use the [kubeadm configuration](/docs/reference/config-api/kubeadm-config.v1beta2/) you must add the `certificateKey` field in the appropriate config locations (under `InitConfiguration` and `JoinConfiguration: controlPlane`). {{< /note >}} diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md b/content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md index 9f868f0637..42a2f4c59e 100644 --- a/content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md +++ b/content/en/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md @@ -258,7 +258,12 @@ Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc6 curl http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address ``` - The workaround is to tell `kubelet` which IP to use using `--node-ip`. When using DigitalOcean, it can be the public one (assigned to `eth0`) or the private one (assigned to `eth1`) should you want to use the optional private network. The [`KubeletExtraArgs` section of the kubeadm `NodeRegistrationOptions` structure](https://github.com/kubernetes/kubernetes/blob/release-1.13/cmd/kubeadm/app/apis/kubeadm/v1beta1/types.go) can be used for this. + The workaround is to tell `kubelet` which IP to use using `--node-ip`. + When using DigitalOcean, it can be the public one (assigned to `eth0`) or + the private one (assigned to `eth1`) should you want to use the optional + private network. The `kubeletExtraArgs` section of the kubeadm + [`NodeRegistrationOptions` structure](/docs/reference/config-api/kubeadm-config.v1beta2/#kubeadm-k8s-io-v1beta2-NodeRegistrationOptions) + can be used for this. Then restart `kubelet`: @@ -331,7 +336,7 @@ Alternatively, you can try separating the `key=value` pairs like so: `--apiserver-extra-args "enable-admission-plugins=LimitRanger,enable-admission-plugins=NamespaceExists"` but this will result in the key `enable-admission-plugins` only having the value of `NamespaceExists`. -A known workaround is to use the kubeadm [configuration file](/docs/setup/production-environment/tools/kubeadm/control-plane-flags/#apiserver-flags). +A known workaround is to use the kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/). ## kube-proxy scheduled before node is initialized by cloud-controller-manager @@ -381,7 +386,7 @@ Kubernetes components like the kubelet and kube-controller-manager use the defau for the feature to work. To workaround this issue you can configure the flex-volume directory using the kubeadm -[configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2). +[configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/). On the primary control-plane Node (created using `kubeadm init`) pass the following file using `--config`: diff --git a/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md b/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md index be98558659..6d61184b52 100644 --- a/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md +++ b/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md @@ -161,7 +161,7 @@ The built-in signer is part of [`kube-controller-manager`](/docs/reference/comma To activate the built-in signer, you must pass the `--cluster-signing-cert-file` and `--cluster-signing-key-file` flags. -If you're creating a new cluster, you can use a kubeadm [configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2): +If you're creating a new cluster, you can use a kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/): ```yaml apiVersion: kubeadm.k8s.io/v1beta2 From 6c542e88c2f5e7478942fd25cd55704245749ea8 Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Fri, 9 Jul 2021 19:55:59 +0800 Subject: [PATCH 2/2] Update content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md Co-authored-by: Tim Bannister --- .../production-environment/tools/kubeadm/dual-stack-support.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md b/content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md index b26158eb5a..8772db093b 100644 --- a/content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md +++ b/content/en/docs/setup/production-environment/tools/kubeadm/dual-stack-support.md @@ -157,5 +157,4 @@ networking: * [Validate IPv4/IPv6 dual-stack](/docs/tasks/network/validate-dual-stack) networking * Read about [Dual-stack](/docs/concepts/services-networking/dual-stack/) cluster networking -* Learn more about the kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/) - +* Learn more about the kubeadm [configuration format](/docs/reference/config-api/kubeadm-config.v1beta2/)