Last active
August 15, 2017 04:10
-
-
Save davistran86/1cc0919010c47526bfb32d574a61722b to your computer and use it in GitHub Desktop.
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
#in this lab, I use 3 computer: | |
- deploy: any pc in network running ubuntu, centos, even my laptop vm | |
- k8s-master : 192.168.70.141 | |
- k8s-node1: 192.168.70.142 | |
#do on deploy, master, node1 | |
nano /etc/hosts | |
192.168.70.141 k8s-master | |
192.168.70.142 k8s-node1 | |
192.168.70.94 kubernetes-master | |
#on master, node1 | |
systemctl stop firewalld | |
systemctl disable firewalld | |
#in deploy | |
mkdir ~/kismatic-deploy | |
cd ~/kismatic-deploy | |
wget https://github.com/apprenda/kismatic/releases/download/v1.5.2/kismatic-v1.5.2-linux-amd64.tar.gz | |
tar -zxcf kismatic-v1.5.2-linux-amd64.tar.gz | |
#in k8s-master, k8s-node1 | |
#create user kismaticuser | |
sudo useradd -d /home/kismaticuser -m kismaticuser | |
sudo passwd kismaticuser | |
echo "kismaticuser ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/kismaticuser | |
sudo chmod 0440 /etc/sudoers.d/kismaticuser | |
#in deploy | |
ssh-keygen -t rsa -b 4096 -f kismaticuser.key -P "" | |
ssh-copy-id -i kismaticuser.key [email protected] | |
ssh-copy-id -i kismaticuser.key [email protected] | |
./kismatic install plan | |
#.... just fill in detail as the script ask | |
nano kismatic-cluster.yaml | |
#remember add absolute path for ssh private key | |
#fill information... | |
./kismatic install apply | |
==================================================================================== | |
The cluster was installed successfully! | |
- To use the generated kubeconfig file with kubectl: | |
* use "./kubectl --kubeconfig generated/kubeconfig" | |
* or copy the config file "cp generated/kubeconfig ~/.kube/config" | |
- To view the Kubernetes dashboard: "./kismatic dashboard" | |
- To SSH into a cluster node: "./kismatic ssh etcd|master|worker|storage|$node.host" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment