X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=blueprints%2FuCPE%2Fk8smaster.sh;fp=blueprints%2FuCPE%2Fk8smaster.sh;h=0000000000000000000000000000000000000000;hb=692eda26d4bb9aea2760f0c3d48d7a91c392afd9;hp=924ee1d669767ef711463582e45f6de06f5961d9;hpb=c19ae19ceb20a1c47d53e5d2a482f6f4fd5cfa38;p=eliot.git diff --git a/blueprints/uCPE/k8smaster.sh b/blueprints/uCPE/k8smaster.sh deleted file mode 100644 index 924ee1d..0000000 --- a/blueprints/uCPE/k8smaster.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -ex -############################################################################## -# Copyright (c) 2019 Huawei Tech and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -KUBE_VERSION=1.16.0-00 -POD_NETWORK_CIDR=192.168.0.0/16 -K8S_CNI_VERSION=0.7.5-00 - -#K8s service CIDR range -K8s_SVC_CIDR=10.96.0.0/12 - -# Install Kubernetes with Kubeadm - -# Disable swap -sudo swapoff -a -sudo apt update -sudo apt install -y apt-transport-https curl -curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - - -cat < hostname.tmp - MASTER_IP="$(cut -d ' ' -f 1 hostname.tmp)" - rm hostname.tmp - sudo kubeadm config images pull - sudo kubeadm init \ - --apiserver-advertise-address="${MASTER_IP}" \ - --pod-network-cidr="${POD_NETWORK_CIDR}" \ - --service-cidr="${K8s_SVC_CIDR}" - - if [ "$(id -u)" = 0 ]; then - KUBECONFIG=/etc/kubernetes/admin.conf - echo "export KUBECONFIG=/etc/kubernetes/admin.conf" | \ - tee -a "${HOME}/.profile" - source "${HOME}/.profile" - else - mkdir -p "${HOME}/.kube" - sudo cp -i /etc/kubernetes/admin.conf "${HOME}/.kube/config" - sudo chown "$(id -u)":"$(id -g)" "${HOME}/.kube/config" - fi - #kubectl apply -f "cni/calico/rbac.yaml" - kubectl apply -f "cni/calico/v38/calico.yaml" - -fi