blob: 8840541b47c75ea72c216233cd653eee1eb2170b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/bash
set -ex
sudo apt-get -y install ntp
cat << EOF | sudo tee /etc/ntp.conf
server 127.127.1.0
fudge 127.127.1.0 stratum 10
EOF
sudo service ntp restart
sudo apt install nfs-kernel-server -y
sudo mkdir /dockerdata-nfs
sudo chmod 777 /dockerdata-nfs
cat << EOF | sudo tee /etc/exports
/dockerdata-nfs *(rw,sync,no_subtree_check,no_root_squash)
EOF
sudo systemctl restart nfs-kernel-server.service
sudo kubeadm init --apiserver-advertise-address=192.168.0.10 --service-cidr=10.96.0.0/16 --pod-network-cidr=10.244.0.0/16 --token 8c5adc.1cec8dbf339093f0
mkdir ~/.kube
sudo cp /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
sed -i "s/kube-subnet-mgr/kube-subnet-mgr\n - --iface=eth1/" kube-flannel.yml
kubectl apply -f kube-flannel.yml
/vagrant/onap_setup.sh
|