Skip to content

How can i set --node-ip and --node-external-ip to each node on install #215

Closed Answered by KorzunKarl
KorzunKarl asked this question in Q&A
Discussion options

You must be logged in to vote

Since I myself asked a very stupid question, I will answer it myself. )))

k3s_control_plane:
  vars:
    k3s_become: true
    k3s_release_version: v1.28.2+k3s1
    k3s_etcd_datastore: true
    k3s_controller_list: ['node-01', 'node-02']
    k3s_server:
      bind-address: 0.0.0.0
      write-kubeconfig-mode: '0644'
      node-ip: "{{ hostvars[inventory_hostname].ansible_eth1.ipv4.address }}"
      node-external-ip: "{{ hostvars[inventory_hostname].ansible_eth0.ipv4.address }}"
      node-label:
        - "NodeTier=node"
        - "NodeLocation=debug"
        - "NodeCustomRole=master"
      disable:
        - traefik
  hosts:
    node-01:
      ansible_user: awx
      ansible_host: 10.11.0…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KorzunKarl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant