Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
f2c160e7
Unverified
Commit
f2c160e7
authored
7 years ago
by
Rong Zhang
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2872 from riverzhang/kube-proxy
Reconfigure kube-proxy to access kube-apiserver via the LB(kubeadm)
parents
cf8e9eed
20bd6569
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/kubernetes/kubeadm/tasks/main.yml
+15
-1
15 additions, 1 deletion
roles/kubernetes/kubeadm/tasks/main.yml
with
15 additions
and
1 deletion
roles/kubernetes/kubeadm/tasks/main.yml
+
15
−
1
View file @
f2c160e7
...
...
@@ -7,7 +7,6 @@
{%- else -%}
{{ kube_apiserver_endpoint }}
{%- endif %}
when
:
not is_kube_master
tags
:
-
facts
...
...
@@ -61,6 +60,21 @@
when
:
not is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint
notify
:
restart kubelet
-
name
:
Update server field in kube-proxy kubeconfig
shell
:
>-
{{ bin_dir }}/kubectl get configmap kube-proxy -n kube-system -o yaml
| sed 's#server:.*#server:\ {{ kube_apiserver_endpoint }}#g'
| kubectl replace -f -
delegate_to
:
"
{{groups['kube-master']|first}}"
run_once
:
true
when
:
is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint
-
name
:
Restart all kube-proxy pods to ensure that they load the new configmap
shell
:
"
{{
bin_dir
}}/kubectl
delete
pod
-n
kube-system
-l
k8s-app=kube-proxy"
delegate_to
:
"
{{groups['kube-master']|first}}"
run_once
:
true
when
:
is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint
# FIXME(mattymo): Reconcile kubelet kubeconfig filename for both deploy modes
-
name
:
Symlink kubelet kubeconfig for calico/canal
file
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment