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

kubeadm token create --print-join-command fails silently #119

Open
aram535 opened this issue Nov 20, 2022 · 1 comment
Open

kubeadm token create --print-join-command fails silently #119

aram535 opened this issue Nov 20, 2022 · 1 comment

Comments

@aram535
Copy link

aram535 commented Nov 20, 2022

VMs: "Ubuntu 22.04.1 LTS"

$ ansible-galaxy role list | grep geerling

  • geerlingguy.ntp, 2.3.1
  • geerlingguy.repo-epel, 3.1.1
  • geerlingguy.security, 2.2.0
  • geerlingguy.swap, 1.0.2
  • geerlingguy.docker, 6.0.3
  • geerlingguy.kubernetes, 7.1.1

playbook:

- hosts: kube 
  become: true 
  vars:
    kubernetes_allow_pods_on_control_plane: true
    docker_install_compose: false 
    docker_users: 
      - ansible
    swap_file_state: absent 
    swap_file_path: /dev/mapper/packer--debian--10--amd64--vg-swap_1
    kubernetes_allow_pods_on_master: false
    kubernetes_apiserver_advertise_address: '192.168.1.110'
    kubernetes_kubelet_extra_args: '--node-ip={{ ansible_host }}'
    kubernetes_join_command_extra_opts: ""

  roles:
    - geerlingguy.security
    - geerlingguy.swap
    - geerlingguy.docker
    - geerlingguy.kubernetes

Partial run output:

TASK [geerlingguy.kubernetes : Set the kubeadm join command globally.] *********************************************************************
skipping: [kub02] => (item=kubmaster) 
skipping: [kub02] => (item=kub01) 
skipping: [kub02] => (item=kub02) 
skipping: [kub02] => (item=kub03) 
skipping: [kub03] => (item=kubmaster) 
skipping: [kub03] => (item=kub01) 
skipping: [kub03] => (item=kub02) 
skipping: [kub03] => (item=kub03) 

TASK [geerlingguy.kubernetes : include_tasks] **********************************************************************************************
included: /home/ansible/.ansible/roles/geerlingguy.kubernetes/tasks/node-setup.yml for kub02
included: /home/ansible/.ansible/roles/geerlingguy.kubernetes/tasks/node-setup.yml for kub03

TASK [geerlingguy.kubernetes : Ensure kubelet is started and enabled at boot.] *************************************************************
ok: [kub01]

TASK [geerlingguy.kubernetes : Join node to Kubernetes master] *****************************************************************************
fatal: [kub02]: FAILED! => 
  msg: |-
    The task includes an option with an undefined variable. The error was: 'kubernetes_join_command' is undefined
  
    The error appears to be in '/home/ansible/.ansible/roles/geerlingguy.kubernetes/tasks/node-setup.yml': line 2, column 3, but may
    be elsewhere in the file depending on the exact syntax problem.
  
    The offending line appears to be:
  
    ---
    - name: Join node to Kubernetes master
      ^ here
@RanchoHam
Copy link

I am having the same problem after having dealt with VirtualBox's restricting private networks to 192.168.56.0 and switching to bento/debian-11.6 to deal with missing update packages.

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

No branches or pull requests

2 participants