Debian 9 使用kubeadm创建 k8s 集群(下)
register: join_command_raw - name: set join command set_fact: join_command: "{{ join_command_raw.stdout_lines[0] }}" - hosts: workers become: yes tasks: - name: join cluster shell: "{{ hostvars['master'].join_command }} >> node_joined.txt" args: chdir: $HOME creates: node_joined.txt 这是剧本的作用: 第一个play获取需要在worker节点上运行的join命令。 此命令将采用以下格式: kubeadm join --token...阅读全文