mirror of https://github.com/k3s-io/k3s
Use v1beta3 node definitions
parent
35c7b16592
commit
c4241fb2ae
|
@ -24,13 +24,13 @@
|
|||
service: name=kube-scheduler enabled=yes state=started
|
||||
|
||||
- name: Copy minion definition json files to master
|
||||
template: src=node.j2 dest=/tmp/node-{{ item }}.yml
|
||||
template: src=node.j2 dest=/tmp/node-{{ item }}.json
|
||||
changed_when: false
|
||||
with_items:
|
||||
groups['minions']
|
||||
|
||||
- name: Load minion definition into master
|
||||
command: /usr/bin/kubectl create -f /tmp/node-{{ item }}.yml
|
||||
command: /usr/bin/kubectl create -f /tmp/node-{{ item }}.json
|
||||
register: command_result
|
||||
failed_when: command_result.rc != 0 and 'already exists' not in command_result.stderr
|
||||
changed_when: "command_result.rc == 0"
|
||||
|
@ -38,7 +38,7 @@
|
|||
groups['minions']
|
||||
|
||||
- name: Delete minion definitions from master
|
||||
file: path=/tmp/node-{{ item }}.yml state=absent
|
||||
file: path=/tmp/node-{{ item }}.json state=absent
|
||||
changed_when: false
|
||||
with_items:
|
||||
groups['minions']
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
apiVersion: v1beta1
|
||||
id: {{ item }}
|
||||
kind: Minion
|
||||
{
|
||||
"apiVersion": "v1beta3",
|
||||
"kind": "Node",
|
||||
"metadata": {
|
||||
"name": "{{ item }}"
|
||||
},
|
||||
"spec": {
|
||||
"externalID": "{{ item }}"
|
||||
},
|
||||
"status": {
|
||||
"capacity": {
|
||||
"cpu": "1",
|
||||
"memory": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue