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 bootstrapper does not support kubelet extra-config #2064

Closed
kevindrosendahl opened this issue Oct 13, 2017 · 3 comments
Closed

kubeadm bootstrapper does not support kubelet extra-config #2064

kevindrosendahl opened this issue Oct 13, 2017 · 3 comments
Labels
co/kubeadm Issues relating to kubeadm kind/bug Categorizes issue or PR as related to a bug.

Comments

@kevindrosendahl
Copy link

kevindrosendahl commented Oct 13, 2017

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

bug report

Please provide the following details:

Environment:

Minikube version (use minikube version): v0.22.3

  • OS (e.g. from /etc/os-release): OS X 10.12.6
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): virtualbox
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): v0.23.5

What happened:

minikube start --bootstrapper kubeadm --kubernetes-version v1.8.0 --extra-config=kubelet.resolv-conf=/tmp/local-k8s-resolv.conf fails with the following error:

E1013 14:18:21.261439   13075 start.go:218] Error updating cluster:  generating kubeadm cfg: generating extra component config for kubeadm: Unknown component map[apiserver:apiServerExtraArgs scheduler:schedulerExtraArgs controller-manager:controllerManagerExtraArgs].  Valid components and kubeadm config are map[apiserver:apiServerExtraArgs scheduler:schedulerExtraArgs controller-manager:controllerManagerExtraArgs]

What you expected to happen:

The kubelet to be configured with the specified extra config.

How to reproduce it (as minimally and precisely as possible):

Run minikube start --bootstrapper kubeadm --kubernetes-version v1.8.0 --extra-config=kubelet.resolv-conf=/tmp/local-k8s-resolv.conf

Output of minikube logs (if applicable):

N/A

Anything else do we need to know:

I may be getting the syntax wrong (#2034) but regardless I believe that the kubelet is not currently supported, as it is not an expected extraOption component in kubeadm.NewComponentExtraArgs:

var componentToKubeadmConfigKey = map[string]string{
Apiserver: "apiServerExtraArgs",
Scheduler: "schedulerExtraArgs",
ControllerManager: "controllerManagerExtraArgs",
}
func NewComponentExtraArgs(opts util.ExtraOptionSlice, version semver.Version) ([]ComponentExtraArgs, error) {
var kubeadmExtraArgs []ComponentExtraArgs
for _, extraOpt := range opts {
kubeadmKey, ok := componentToKubeadmConfigKey[extraOpt.Component]
if !ok {
return nil, fmt.Errorf("Unknown component %s. Valid components and kubeadm config are %v", componentToKubeadmConfigKey, componentToKubeadmConfigKey)
}
extraConfig, err := ExtraConfigForComponent(extraOpt.Component, opts, version)
if err != nil {
return nil, errors.Wrapf(err, "getting kubeadm extra args for %s", extraOpt.Component)
}
if len(extraConfig) > 0 {
kubeadmExtraArgs = append(kubeadmExtraArgs, ComponentExtraArgs{
Component: kubeadmKey,
Options: extraConfig,
})
}
}
return kubeadmExtraArgs, nil
}

(edited slightly to fix minikube start command)

@kevindrosendahl kevindrosendahl changed the title kubadm bootstrapper does not support kublet extra-config kubeadm bootstrapper does not support kublet extra-config Oct 13, 2017
@kevindrosendahl kevindrosendahl changed the title kubeadm bootstrapper does not support kublet extra-config kubeadm bootstrapper does not support kubelet extra-config Oct 13, 2017
@r2d4
Copy link
Contributor

r2d4 commented Oct 13, 2017

Good catch, this is fixed in #2037

@r2d4 r2d4 added co/kubeadm Issues relating to kubeadm kind/bug Categorizes issue or PR as related to a bug. labels Oct 13, 2017
@kevindrosendahl
Copy link
Author

Ah, missed that somehow, thanks!

@r2d4 r2d4 closed this as completed Oct 17, 2017
@Morriz
Copy link

Morriz commented Nov 11, 2017

This still fails for me if I start with:

minikube start \
    --kubernetes-version v1.8.1 \
    --bootstrapper kubeadm \
    --v 10 \
    --logtostderr \
    --extra-config=apiserver.Admission.PluginNames="Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,GenericAdmissionWebhook,ResourceQuota,PodPreset"
    --registry-mirror=http://localhost:6000

The boot script hangs and the api-server does not start correctly. I see :8443: getsockopt: connection refused errors in the journal.

If I leave the --extra-config part out it boots correctly, but I can't use my flags ;p

I'm on OSX 10.12.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/kubeadm Issues relating to kubeadm kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants