mirror of https://github.com/easzlab/kubeasz.git
feat: add support to set nodename, part3
parent
8e725a2ca1
commit
cf4aaa3f0a
|
@ -27,8 +27,11 @@ CONTEXT_NAME: "context-{{ CLUSTER_NAME }}"
|
|||
K8S_VER: "__k8s_ver__"
|
||||
|
||||
# set unique 'k8s_nodename' for each node, if not set(default:'') ip add will be used
|
||||
# CAUTION: 'k8s_nodename' must consist of lower case alphanumeric characters, '-' or '.',
|
||||
# and must start and end with an alphanumeric character (e.g. 'example.com'),
|
||||
# regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
|
||||
K8S_NODENAME: "{%- if k8s_nodename != '' -%} \
|
||||
{{ k8s_nodename }} \
|
||||
{{ k8s_nodename|replace('_', '-')|lower }} \
|
||||
{%- else -%} \
|
||||
{{ inventory_hostname }} \
|
||||
{%- endif -%}"
|
||||
|
|
|
@ -3,10 +3,14 @@
|
|||
192.168.1.1
|
||||
|
||||
# master node(s), set unique 'k8s_nodename' for each node
|
||||
# CAUTION: 'k8s_nodename' must consist of lower case alphanumeric characters, '-' or '.',
|
||||
# and must start and end with an alphanumeric character
|
||||
[kube_master]
|
||||
192.168.1.1 k8s_nodename=''
|
||||
|
||||
# work node(s), set unique 'k8s_nodename' for each node
|
||||
# CAUTION: 'k8s_nodename' must consist of lower case alphanumeric characters, '-' or '.',
|
||||
# and must start and end with an alphanumeric character
|
||||
[kube_node]
|
||||
192.168.1.1 k8s_nodename=''
|
||||
|
||||
|
|
|
@ -5,14 +5,19 @@
|
|||
192.168.1.3
|
||||
|
||||
# master node(s), set unique 'k8s_nodename' for each node
|
||||
# CAUTION: 'k8s_nodename' must consist of lower case alphanumeric characters, '-' or '.',
|
||||
# and must start and end with an alphanumeric character
|
||||
[kube_master]
|
||||
192.168.1.1 k8s_nodename=''
|
||||
192.168.1.2 k8s_nodename=''
|
||||
192.168.1.1 k8s_nodename='master-01'
|
||||
192.168.1.2 k8s_nodename='master-02'
|
||||
192.168.1.3 k8s_nodename='master-03'
|
||||
|
||||
# work node(s), set unique 'k8s_nodename' for each node
|
||||
# CAUTION: 'k8s_nodename' must consist of lower case alphanumeric characters, '-' or '.',
|
||||
# and must start and end with an alphanumeric character
|
||||
[kube_node]
|
||||
192.168.1.3 k8s_nodename=''
|
||||
192.168.1.4 k8s_nodename=''
|
||||
192.168.1.4 k8s_nodename='worker-01'
|
||||
192.168.1.5 k8s_nodename='worker-02'
|
||||
|
||||
# [optional] harbor server, a private docker registry
|
||||
# 'NEW_INSTALL': 'true' to install a harbor server; 'false' to integrate with existed one
|
||||
|
|
Loading…
Reference in New Issue