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

kubeadm-setup: add page about control plane flags #9067

Merged
merged 1 commit into from
Jun 25, 2018

Conversation

neolit123
Copy link
Member

This page adds instructions on how to use the kubeadm config
to pass flags to control plane components.

The provided examples are pretty basic. Later this can be expanded with
actual user stories.

Updates kubernetes/kubeadm#849

/cc @fabriziopandini @luxas @timstclair @kubernetes/sig-cluster-lifecycle-pr-reviews
/assign @Bradamant3

notes:

  • it's against the master branch as discussed on the kubeadm office hours from 13th June.
  • i've ended up picking setup/independent as the location for this.
  • let me know of changes that i need to make - e.g. hugo formatting?
  • this obviously has to be extended with actual user content but we plan to do that in time.

@k8s-ci-robot k8s-ci-robot added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 13, 2018
@k8sio-netlify-preview-bot
Copy link
Collaborator

Deploy preview for kubernetes-io-master-staging ready!

Built with commit dd838ab

https://deploy-preview-9067--kubernetes-io-master-staging.netlify.com

@k8sio-netlify-preview-bot
Copy link
Collaborator

k8sio-netlify-preview-bot commented Jun 13, 2018

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 4e5e3de

https://deploy-preview-9067--kubernetes-io-master-staging.netlify.com

Copy link
Member

@luxas luxas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @neolit123 for this. A couple of comments

Example usage:
```yaml
schedulerExtraArgs:
address: 192.168.0.104
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd do 0.0.0.0 as a generic reasonable value for this

schedulerExtraArgs:
address: 192.168.0.104
config: /home/johndoe/schedconfig
master: 192.168.0.103
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a URL, e.g. https://my-api-server.domain.com:6443

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but preferably, I'd set kubeconfig to something here instead...

```yaml
schedulerExtraArgs:
address: 192.168.0.104
config: /home/johndoe/schedconfig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.yaml

```yaml
controllerManagerExtraArgs:
cluster-signing-key-file: /home/johndoe/keys/ca.key
bind-address: 192.168.0.101
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.0.0.0

controllerManagerExtraArgs:
cluster-signing-key-file: /home/johndoe/keys/ca.key
bind-address: 192.168.0.101
deployment-controller-sync-period: 50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a duration right? 50s?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

```yaml
apiServerExtraArgs:
advertise-address: 192.168.0.103
allow-privileged: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is deprecated I think... some other common value like enable-admission-control?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The most common uses are:

adding admission controllers
configuring audit log (soon to be webhook)

- `ControllerManagerExtraArgs`
- `SchedulerExtraArgs`

The fields can contain a list of `key: value` pairs. To override flags for a specific control plane component just include one of the fields above and start adding flags for it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add a (it's serialized as a map[string]string, like Kubernetes labels or annotations)`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/just/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What value for a user does the content that luxas suggests add? This seems like an implementation detail that does not belong here. We've already got a larger confusion in the kubeadm docs between what a user needs and what a dev needs; let's not perpetuate it here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Larger scale edit:

These fields consist of key: value pairs. To override a flag for a control plane component:

  1. Add the appropriate field to your configuration.
  2. Add the flags to override to the field.


Example usage:
```yaml
apiServerExtraArgs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include full typemeta information in every example please

- fabriziopandini
- luxas
- timothysc
title: Customizing control plane flags with kubeadm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customizing control plane configuration with kubeadm is more generic and future-proof

@luxas
Copy link
Member

luxas commented Jun 14, 2018

/assign

@timothysc
Copy link
Member

Is this the right location?

Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments.

- `ControllerManagerExtraArgs`
- `SchedulerExtraArgs`

The fields can contain a list of `key: value` pairs. To override flags for a specific control plane component just include one of the fields above and start adding flags for it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/just/

```yaml
apiServerExtraArgs:
advertise-address: 192.168.0.103
allow-privileged: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The most common uses are:

adding admission controllers
configuring audit log (soon to be webhook)

controllerManagerExtraArgs:
cluster-signing-key-file: /home/johndoe/keys/ca.key
bind-address: 192.168.0.101
deployment-controller-sync-period: 50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

@neolit123
Copy link
Member Author

@luxas, @timstclair thanks for the reviews. i will update this tomorrow.

Is this the right location?

it felt right to me to under setup and not tasks or cmd reference.
i'm not sure; maybe collect more opinions?

@Bradamant3
Copy link
Contributor

Copy link
Contributor

@Bradamant3 Bradamant3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyedits for readability and usability, plus a question about requested information that doesn't seem to belong here.

- `ControllerManagerExtraArgs`
- `SchedulerExtraArgs`

The fields can contain a list of `key: value` pairs. To override flags for a specific control plane component just include one of the fields above and start adding flags for it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What value for a user does the content that luxas suggests add? This seems like an implementation detail that does not belong here. We've already got a larger confusion in the kubeadm docs between what a user needs and what a dev needs; let's not perpetuate it here.


{{< note >}}
In later versions of the kubeadm configuration these fields will be replaced by usage of a ComponentConfig and a ConfigMap.
{{< /note >}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove entire note. Future statements are dangerous, and of no use to current users. (Again, this is one of those user/developer confusions.)


## APIServer flags

The list of possible APIServer flags and their descriptions can be found [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edit to:
"For details, see the reference documentation for kube-apiserver."

(note formation of link also)

- `ControllerManagerExtraArgs`
- `SchedulerExtraArgs`

The fields can contain a list of `key: value` pairs. To override flags for a specific control plane component just include one of the fields above and start adding flags for it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Larger scale edit:

These fields consist of key: value pairs. To override a flag for a control plane component:

  1. Add the appropriate field to your configuration.
  2. Add the flags to override to the field.


## ControllerManager flags

The list of possible ControllerManager flags and their descriptions can be found [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment at line 27 -- follow the same pattern here.


## Scheduler flags

The list of possible Scheduler flags and their descriptions can be found [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See line 27, follow pattern.

@neolit123
Copy link
Member Author

i will update this tomorrow.

i'm going to have to delay the edits for the weekend or monday.

@neolit123
Copy link
Member Author

hi, @timstclair @luxas @Bradamant3
i've added the changes. LMK if this better and i will rebase / squash.

in terms of location i'm leaving this as is, unless someone objects?

@Bradamant3 thanks for taking the time to write the document:
https://docs.google.com/document/d/1-pAxBmV7c0DfbJVU33oK4Cozd99Z_16HX1-MLZ-A6OY/edit?usp=sharing

do we have a tracking issue for the kubeadm docs folder restructuring and if not do you want me to create one? also in which repo k/website or k/kubeadm?

@timothysc
Copy link
Member

@neolit123 - only comment is the addition of the meta-data @luxas mentioned earlier, other

@neolit123
Copy link
Member Author

@timothysc

only comment is the addition of the meta-data @luxas mentioned earlier, other

i've included apiVersion and kind from the apimachinery/pkg/apis/meta/v1/TypeMeta embedded struct. is something else needed?

@timothysc
Copy link
Member

@neolit123 I think adding:

metadata: 
   name: 1.11-sample

is useful to the readers w/possible link to https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#objectmeta-v1-meta optional params.

@neolit123
Copy link
Member Author

added the metadata (metav1.ObjectMeta) field examples as @timothysc suggested.
added link to godocs, which should include metav1.ObjectMeta and the latest config when the new generated docs are up.

@timothysc
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 18, 2018
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 18, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 18, 2018
@neolit123
Copy link
Member Author

squashed commits. waiting on approval.

@timothysc timothysc added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 19, 2018

{{% capture overview %}}

kubeadm’s configuration exposes the following fields that can be used to override the default flags passed to control plane components such as the APISever, ControllerManager and Scheduler:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/APISever/APIServer

@Bradamant3
Copy link
Contributor

approved review changes, not adding hold but in case anybody else is looking here: author is still fixing a typo and some template problems. I don't have commit access (GH ftw ...)

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 25, 2018
@neolit123 neolit123 force-pushed the control-plane-components branch 3 times, most recently from ed0de5e to 953bdea Compare June 25, 2018 19:58
This page adds instructions on how to use the kubeadm config
to pass flags to control plane components.

The provided examples are pretty basic. Later this can be expanded with
actual user stories.
@Bradamant3
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 25, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bradamant3

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 25, 2018
@k8s-ci-robot k8s-ci-robot merged commit bf23c87 into kubernetes:master Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants