The --api-servers is no longer supported by Kubelet 1.9, use the kubelet.kubeconfig approach.
#2863
The --api-servers is no longer supported by Kubelet 1.9, use the kubelet.kubeconfig approach.
#2863
Conversation
init/systemd/environ/kubelet
Outdated
| @@ -10,5 +10,9 @@ KUBELET_ADDRESS="--address=127.0.0.1" | |||
| # You may leave this blank to use the actual hostname | |||
| KUBELET_HOSTNAME="--hostname-override=127.0.0.1" | |||
|
|
|||
| # Edit the kubelet.kubeconfig to have correct cluster server address | |||
| # then uncomment this line | |||
| # KUBELET_KUBECONFIG=/etc/kubernetes/kubelet.kubeconfig | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# KUBELET_KUBECONFIG=--kubeconfig=/etc/kubernetes/kubelet.kubeconfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True.
| kind: Config | ||
| clusters: | ||
| - cluster: | ||
| server: http://replace_with_master_hostname:8080/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be either templated or set to localhost.
| @@ -11,7 +11,7 @@ EnvironmentFile=-/etc/kubernetes/kubelet | |||
| ExecStart=/usr/bin/kubelet \ | |||
| $KUBE_LOGTOSTDERR \ | |||
| $KUBE_LOG_LEVEL \ | |||
| $KUBELET_API_SERVER \ | |||
| $KUBELET_KUBECONFIG \ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KUBELET_KUBECONFIG is currently commented out so the service would fail when run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undefined value should not harm. We can of course uncomment that KUBELET_KUBECONFIG assignment above if you prefer.
|
This fix is applicable only for 1-node cluster deployments. In order to support multi-node deployments, we need to update Ansible role at https://github.com/kubernetes/contrib/tree/master/ansible/roles/node as well. Plus, the Ansible in this repo is no longer supported. |
Well, it's an attempt to address kubernetes/website#7521 which is about https://kubernetes.io/docs/getting-started-guides/fedora/fedora_manual_config/ which is specifically single-node setup. Would the proposed changes (if they get updated to address your comments) harm the multi-host setup, compared to the state today? |
…let.kubeconfig approach.
6cbd83b
to
f4ce29d
Compare
|
Rebased on master, uncommented |
|
None of the changed files are used during the Ansible deployment. Given the systemd files are supposed to be used with the latest k8s version, they are currently unusable. So it's safe to merge the changes. Assuming admin/user will modify the files properly. Thanks Jan for the fixes. |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: adelton, ingvagabund 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 |
Addressing (partially) kubernetes/website#7521 and https://bugzilla.redhat.com/show_bug.cgi?id=1549151.