This file contains 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
resource "rke_cluster" "cluster" { | |
nodes { | |
address = "node1.brotandgames.com" | |
user = "root" | |
role = ["controlplane", "worker", "etcd"] | |
ssh_key = "${file("~/.ssh/id_rsa")}" | |
} | |
addons_include = [ | |
"https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml", | |
"https://gist.githubusercontent.com/superseb/499f2caa2637c404af41cfb7e5f4a938/raw/930841ac00653fdff8beca61dab9a20bb8983782/k8s-dashboard-user.yml", |
This file contains 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
0.1.0 |
This file contains 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
# Input ENV variables | |
export RANCHER_HOSTNAME=rancher.your-host.com | |
export RANCHER_LETSENCRYPT_EMAIL=your-mail@your-host.com | |
# Helm setup rbac | |
kubectl --kubeconfig ${KUBECONFIG} create clusterrolebinding add-on-cluster-admin \ | |
--clusterrole=cluster-admin --serviceaccount=kube-system:default | |
# Helm init: install tiller etc. | |
helm init |
This file contains 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
# Setup working directory | |
export WORKDIR=~/rke-test | |
mkdir ${WORKDIR} | |
cd ${WORKDIR} | |
# Configure Kubernetes Cluster - follow the instructions | |
# This will create an config.yaml file which you can adjust later on | |
rke config | |
# Deploy Kubernetes Cluster |
This file contains 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
export DOCKER_VERSION=18.06.2 | |
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt list docker-ce -a | |
sudo apt-get install -y docker-ce=${DOCKER_VERSION}~ce-0~ubuntu-$(lsb_release -cs) |