Skip to content

Commit

Permalink
fix: explicitly set bind-address for scheduler and controller-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
bissquit committed Dec 1, 2023
1 parent f3778d0 commit d97f936
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ k8s_cluster_cluster_configuration:
# In a cluster with more than one control plane instances, this field should be assigned
# the address of the external load balancer in front of the control plane instances
controlPlaneEndpoint: "{{ hostvars[inventory_hostname]['ansible_facts']['default_ipv4']['address'] }}:6443"
# controller-manager and scheduler listen 127.0.0.1 address and respective port by default.
# it could be a problem if you are going to deploy monitoring stack because it would be
# scrapping <node_ip>:<port> (node_ip - because those manifests have 'hostNetwork: true')
#
# read more about kube-controller-manager options:
# https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/
controllerManager:
extraArgs:
bind-address: 0.0.0.0
# https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/
scheduler:
extraArgs:
bind-address: 0.0.0.0

# https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/
k8s_cluster_kubelet_configuration:
Expand Down
4 changes: 4 additions & 0 deletions molecule/end-to-end/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
- name: Include verify common
ansible.builtin.include_tasks:
file: ../verify-common.yml

- name: temporary test

Check failure on line 11 in molecule/end-to-end/verify.yml

View workflow job for this annotation

GitHub Actions / Run linters

fqcn[action-core]

Use FQCN for builtin module actions (shell).

Check failure on line 11 in molecule/end-to-end/verify.yml

View workflow job for this annotation

GitHub Actions / Run linters

no-changed-when

Commands should not change things if nothing needs doing.
shell: |
netstat -tulpn

0 comments on commit d97f936

Please sign in to comment.