Last active
October 17, 2018 14:02
-
-
Save yuvalif/b50e8b5774c8db737403e206abe06f90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is based on ovn-kubernetes installation as described here: | |
# https://gist.github.com/yuvalif/ce6c576390585e8a39c98e385ce9b83f | |
# this runs ovnkube as master | |
# run on Fedora28 as root | |
set -ex | |
# set variables | |
export CENTRAL_IP=`ip -o addr show|grep -v docker |awk '{ print $4 }'|grep -v '^127' |grep -v '^fe80' |grep -v ':' |head -n 1 |cut -f1 -d/` | |
export CLUSTER_IP_SUBNET=10.244.0.0/16 | |
export NODE_NAME=$CENTRAL_IP | |
export TOKEN=abcdef.1234567890123456 | |
export SERVICE_IP_SUBNET=`kubectl cluster-info dump | grep service-cluster | cut -d'=' -f2 | cut -d'"' -f1` | |
# run the ovn-kubernetes daemon | |
nohup ovnkube -k8s-kubeconfig /etc/kubernetes/admin.conf \ | |
-net-controller \ | |
-loglevel=4 \ | |
-logfile="/var/log/openvswitch/ovnkube.log" \ | |
-k8s-apiserver="http://$CENTRAL_IP:8080" \ | |
-init-master=$NODE_NAME \ | |
-nodeport \ | |
-nb-address="tcp://$CENTRAL_IP:6641" \ | |
-sb-address="tcp://$CENTRAL_IP:6642" \ | |
-k8s-token="$TOKEN" \ | |
-service-cluster-ip-range=$SERVICE_IP_SUBNET \ | |
-cluster-subnet=$CLUSTER_IP_SUBNET 2>&1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment