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

Add the ability to customize the kube-controller-manager and kube-scheduler arguments #171

Merged

Conversation

drustan
Copy link
Contributor

@drustan drustan commented Nov 17, 2023

Description

I recently installed the kube-prometheus-stack on my RKE2 cluster and I had to modify the bind address for both kube-controller-manager and kube-scheduler. This enable the ability to do so.

Type of change

  • arguments customization of kube-controller-manager
  • arguments customization of kube-manager

How Has This Been Tested?

Tested on my cluster :

[…]
TASK [rke2 : Copy rke2 config] ********************************************************************************************************************************************************************************************************
--- before: /etc/rancher/rke2/config.yaml                                                                                                                                                                                              
+++ after: /home/drustan/.ansible/tmp/ansible-local-1078711o6wjcsgb/tmprae1u2ef/config.yaml.j2                                                                                                                                          
@@ -10,3 +10,8 @@                                                                                                                                                                                                                      
 snapshotter: overlayfs                                                                                                                                                                                                                
 node-name: k8s.xxxxx.xxx                                                                                                                                                                                                  
 disable-kube-proxy: true                                                                                                                                                                                                              
 etcd-expose-metrics: true                                                                                                                                                                                                             
+kube-controller-manager-arg:                                                                                                                                                                                                          
+  - bind-address=0.0.0.0                                                                                                                                                                                                              
+kube-scheduler-arg:                                                                                                                                                                                                                   
+  - bind-address=0.0.0.0                                                                                                                                                                                                              
                                                                                                                                                                                                                                       
changed: [k8s.xxxxx.xxx] 
[…]

Copy link
Collaborator

@MonolithProjects MonolithProjects left a comment

Choose a reason for hiding this comment

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

LGTM

@MonolithProjects MonolithProjects self-assigned this Nov 25, 2023
@MonolithProjects MonolithProjects added the enhancement New feature or request label Nov 25, 2023
@MonolithProjects MonolithProjects merged commit ad3cbd5 into lablabs:main Nov 25, 2023
6 checks passed
@hoangphuocbk
Copy link
Contributor

@MonolithProjects, IMO it is better to config rke2_server_options without creating new variable

rke2_server_options:
  - "kube-controller-manager-arg: ['bind-address=0.0.0.0']" 

@drustan
Copy link
Contributor Author

drustan commented Nov 27, 2023

Hi @hoangphuocbk

If it seems like a good idea for the sake of simplicity, defining rke2_server_options at the host level (in host_vars), such as for specifying the node-ip parameter, would take precedence over rke2_server_options at the group level. In that case, following your suggestion would require defining cluster-wide options in the host_vars file of every host.

I hope that what I'm trying to say is clear and understandable ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants