05dc2b3a09
* Use K8s 1.14 and add kubeadm experimental control plane mode
This reverts commit d39c273d96
.
* Cleanup kubeadm setup run on first master
* pin kubeadm_certificate_key in test
* Remove kubelet autolabel of kube-node, add symlink for pki dir
Change-Id: Id5e74dd667c60675dbfe4193b0bc9fb44380e1ca
68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
---
|
|
- name: Create kubernetes directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: kube
|
|
when: inventory_hostname in groups['k8s-cluster']
|
|
become: true
|
|
tags:
|
|
- kubelet
|
|
- k8s-secrets
|
|
- kube-controller-manager
|
|
- kube-apiserver
|
|
- bootstrap-os
|
|
- apps
|
|
- network
|
|
- master
|
|
- node
|
|
with_items:
|
|
- "{{bin_dir}}"
|
|
- "{{ kube_config_dir }}"
|
|
- "{{ kube_cert_dir }}"
|
|
- "{{ kube_manifest_dir }}"
|
|
- "{{ kube_script_dir }}"
|
|
|
|
- name: Create kubernetes kubeadm compat cert dir (kubernetes/kubeadm issue 1498)
|
|
file:
|
|
src: "{{ kube_cert_dir }}"
|
|
dest: "{{ kube_cert_compat_dir }}"
|
|
state: link
|
|
when:
|
|
- kube_cert_dir != kube_cert_compat_dir
|
|
|
|
- name: Create cni directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: kube
|
|
with_items:
|
|
- "/etc/cni/net.d"
|
|
- "/opt/cni/bin"
|
|
- "/var/lib/calico"
|
|
when:
|
|
- kube_network_plugin in ["calico", "weave", "canal", "flannel", "contiv", "cilium", "kube-router"]
|
|
- inventory_hostname in groups['k8s-cluster']
|
|
tags:
|
|
- network
|
|
- cilium
|
|
- calico
|
|
- weave
|
|
- canal
|
|
- contiv
|
|
- kube-router
|
|
- bootstrap-os
|
|
|
|
- name: Create local volume provisioner directories
|
|
file:
|
|
path: "{{ local_volume_provisioner_storage_classes[item].host_dir }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: 0700
|
|
with_items: "{{ local_volume_provisioner_storage_classes.keys() | list }}"
|
|
when:
|
|
- inventory_hostname in groups['k8s-cluster']
|
|
- local_volume_provisioner_enabled
|
|
tags:
|
|
- persistent_volumes
|