This has been updated to install Dashboard v2.0.0, see below for pre v2.0.0 instructions
Generate the kubeconfig file for your cluster using the Kubeconfig File
button in the Cluster view of your cluster.
#!/bin/bash | |
echo "This will generate a new kube config for accessing your RKE-created kubernetes cluster. This script MUST be run on a Kubernetes node." | |
echo "Please enter the IP of one of your control plane hosts, followed by [ENTER]:" | |
read cphost | |
openssl genrsa -out kube-admin.key 2048 | |
openssl req -new -sha256 -key kube-admin.key -subj "/O=system:masters/CN=kube-admin" -out kube-admin.csr | |
sudo openssl x509 -req -in kube-admin.csr -CA /etc/kubernetes/ssl/kube-ca.pem -CAcreateserial -CAkey /etc/kubernetes/ssl/kube-ca-key.pem -out kube-admin.crt -days 365 -sha256 | |
sudo rm -f /etc/kubernetes/ssl/kube-ca.srl |
#!/bin/bash | |
if [[ $DEBUG == "true" ]]; then | |
set -x | |
fi | |
# Check if tools exist | |
command -v jq >/dev/null 2>&1 || { echo "jq is not installed. Exiting." >&2; exit 1; } | |
command -v dig >/dev/null 2>&1 || { echo "dig is not installed. Exiting." >&2; exit 1; } | |
command -v curl >/dev/null 2>&1 || { echo "curl is not installed. Exiting." >&2; exit 1; } | |
command -v sed >/dev/null 2>&1 || { echo "sed is not installed. Exiting." >&2; exit 1; } |
This has been updated to install Dashboard v2.0.0, see below for pre v2.0.0 instructions
Generate the kubeconfig file for your cluster using the Kubeconfig File
button in the Cluster view of your cluster.
storageClass with PersistentVolumeClaims are really the way to do storage with Kubernetes.
For Azure There are 3 types of storage avalible.
#!/bin/bash | |
RANCHER_URL=http://rancher_server:8080 | |
ENV=1a7 | |
for host in `curl -s http://$RANCHER_URL/v2-beta/projects/$ENV/hosts/ | jq -r '.data[] | select(.state == "disconnected") | .id'`; do echo Deactivating $host; curl -X POST -d '{}' http://$RANCHER_URL/v2-beta/projects/$ENV/hosts/$host/?action=deactivate; echo Deleting $host; curl -X DELETE -H 'Accept: application/json' http://$RANCHER_URL/v2-beta/projects/$ENV/hosts/$host; done |
#!/usr/bin/env sh | |
docker-machine rm -f rancher host1 | |
docker-machine create rancher --driver virtualbox --virtualbox-cpu-count "-1" --virtualbox-disk-size "8000" --virtualbox-memory "512" --virtualbox-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v1.11.2/boot2docker.iso | |
docker-machine scp scripts/rancher-net.sh rancher:. | |
docker-machine ssh rancher sh rancher-net.sh | |
docker-machine regenerate-certs rancher -f | |
eval $(docker-machine env rancher) | |
docker-compose up -d | |
eval $(docker-machine env -u) | |
docker-machine create host1 --driver virtualbox --virtualbox-cpu-count "-1" --virtualbox-disk-size "54000" --virtualbox-memory "2048" --virtualbox-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v1.11.2/boot2docker.iso |