This patch changes to be able to build the k8s cluster on local environment with devstack-plugin-container by setting KUBERNETES_VIM=True in local.conf. This patch also includes the following fixes: * Remove settings related to kuryr-kubernetes. * Added processing to configure required settings in devstack-plugin-container. * Modify related documents. * Dropping octavia. Change-Id: I6a898c3d82bd82b6b687d1941565e0efa963cdbb
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
- block:
|
|
# NOTE: When create a k8s environment with devstack-plugin-container and
|
|
# deploy a Pod, the following error occurred - `network: failed to set bridge
|
|
# addr: "cni0" already has an IP address different from 10.x.x.x` and
|
|
# the Pod fails to be deployed. As a fix, delete the related interface and
|
|
# restart service.
|
|
- name: k8s interface down
|
|
shell: ip link set cni0 down && ip link set flannel.1 down
|
|
become: yes
|
|
|
|
- name: k8s interface delete
|
|
shell: ip link delete cni0 && ip link delete flannel.1
|
|
become: yes
|
|
|
|
- name: kubelet service restart
|
|
service:
|
|
name: kubelet
|
|
state: restarted
|
|
become: yes
|
|
|
|
- name: Get coredns name
|
|
shell: >
|
|
kubectl get pod -n kube-system --no-headers -o custom-columns=":metadata.name"
|
|
| grep coredns | tr -s '\n' ' '
|
|
register: coredns_name
|
|
become: yes
|
|
become_user: stack
|
|
|
|
- name: Restart coredns pod
|
|
shell: >
|
|
kubectl delete pod -n kube-system {{ coredns_name.stdout }}
|
|
become: yes
|
|
become_user: stack
|
|
|
|
- name: Delete existing flannel
|
|
shell: >
|
|
kubectl delete -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
|
|
become: yes
|
|
become_user: stack
|
|
|
|
- name: Restart flannel
|
|
shell: >
|
|
kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
|
|
become: yes
|
|
become_user: stack
|
|
|
|
when:
|
|
- inventory_hostname == 'controller-k8s'
|
|
- k8s_api_url is defined
|