[K8s] Create service folders for addons and configs

This patch creates directory for kubernetes addons
and put kubeconfig.yaml file to k8s nodes

Change-Id: I943724b71151de2ce6e95259ddab3d596b94e214
This commit is contained in:
Dmytro Dovbii 2016-09-28 19:24:41 +03:00
parent 12f45a06d8
commit df281eb66c
4 changed files with 19 additions and 0 deletions

View File

@ -50,6 +50,7 @@ Scripts:
- environ/kube-config - environ/kube-config
- systemd/kube-proxy.service - systemd/kube-proxy.service
- systemd/kubelet.service - systemd/kubelet.service
- kubeconfig.yaml
Options: Options:
captureStdout: true captureStdout: true

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Config
clusters:
- cluster:
server: http://%%MASTER_IP%%:8080
name: kubernetes
contexts:
- context:
cluster: kubernetes
user: ""
name: kubelet-context
current-context: kubelet-context

View File

@ -5,6 +5,8 @@
#Create log folder for Kubernetes services #Create log folder for Kubernetes services
mkdir -p /var/run/murano-kubernetes mkdir -p /var/run/murano-kubernetes
mkdir -p /etc/kubernetes/
mkdir -p /etc/kubernetes/addons
if [[ $(which systemctl) ]]; then if [[ $(which systemctl) ]]; then
systemctl stop kube* systemctl stop kube*

View File

@ -6,6 +6,7 @@
# $4 - USE_CALICO # $4 - USE_CALICO
mkdir -p /var/run/murano-kubernetes mkdir -p /var/run/murano-kubernetes
mkdir -p /etc/kubernetes/
if [[ $(which systemctl) ]]; then if [[ $(which systemctl) ]]; then
@ -54,4 +55,7 @@ else
service kube-proxy start service kube-proxy start
fi fi
sed -i.bak "s/%%MASTER_IP%%/$3/g" kubeconfig.yaml
cp -f kubeconfig.yaml /etc/kubernetes/
sleep 1 sleep 1