mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
Use v1beta3 node definitions
This commit is contained in:
parent
35c7b16592
commit
c4241fb2ae
@ -24,13 +24,13 @@
|
|||||||
service: name=kube-scheduler enabled=yes state=started
|
service: name=kube-scheduler enabled=yes state=started
|
||||||
|
|
||||||
- name: Copy minion definition json files to master
|
- 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
|
changed_when: false
|
||||||
with_items:
|
with_items:
|
||||||
groups['minions']
|
groups['minions']
|
||||||
|
|
||||||
- name: Load minion definition into master
|
- 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
|
register: command_result
|
||||||
failed_when: command_result.rc != 0 and 'already exists' not in command_result.stderr
|
failed_when: command_result.rc != 0 and 'already exists' not in command_result.stderr
|
||||||
changed_when: "command_result.rc == 0"
|
changed_when: "command_result.rc == 0"
|
||||||
@ -38,7 +38,7 @@
|
|||||||
groups['minions']
|
groups['minions']
|
||||||
|
|
||||||
- name: Delete minion definitions from master
|
- 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
|
changed_when: false
|
||||||
with_items:
|
with_items:
|
||||||
groups['minions']
|
groups['minions']
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
apiVersion: v1beta1
|
{
|
||||||
id: {{ item }}
|
"apiVersion": "v1beta3",
|
||||||
kind: Minion
|
"kind": "Node",
|
||||||
|
"metadata": {
|
||||||
|
"name": "{{ item }}"
|
||||||
|
},
|
||||||
|
"spec": {
|
||||||
|
"externalID": "{{ item }}"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"capacity": {
|
||||||
|
"cpu": "1",
|
||||||
|
"memory": "1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user