Skip to content

Instantly share code, notes, and snippets.

@lanoxx
Created July 12, 2019 20:24
Show Gist options
  • Select an option

  • Save lanoxx/6bb6bea255150559e69368245e55b7e9 to your computer and use it in GitHub Desktop.

Select an option

Save lanoxx/6bb6bea255150559e69368245e55b7e9 to your computer and use it in GitHub Desktop.
- name: Kubernetes Master | Create service OVN Kube
blockinfile:
path: /etc/systemd/system/ovn-k8s-watcher.service
create: yes
block: |
[Unit]
Description=OVN watches the Kubernetes API
Documentation=https://github.com/openvswitch/ovn-kubernetes#watchers-on-master-node
[Service]
ExecStart=/usr/bin/ovnkube \
-init-master "{{ node_name }}" \
-cluster-subnet "{{ kubernetes_cluster_info.CLUSTER_SUBNET }}" \
-service-cluster-ip-range "{{ kubernetes_cluster_info.SERVICE_CLUSTER_IP_RANGE }}" \
-nodeport \
-net-controller \
-k8s-token {{TOKEN}} \
-k8s-cacert /etc/openvswitch/k8s-ca.crt \
-k8s-apiserver "https://{{ host_public_ip }}" \
-nb-address tcp://127.0.0.1:6641 \
-sb-address tcp://127.0.0.1:6642
Restart=on-failure
RestartSec=10
WorkingDirectory=/root/
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment