File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
kubernetes-basics/kubernetes-setup Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 44#### Prerequisites
55- Install link:../ansible-basics/README.asciidoc[Ansible].
66- Install VirtualBox and Vagrant.
7- - Install https://github.com/ahmetb/kubectx[kubectx] to help with switching context.
8- - Install https://github.com/derailed/k9s[k9s], UI to your cluster.
97
108
119#### Prepare K8s cluster with Vagrant and Ansible
12- Inspired by https://kubernetes.io/blog/2019/03/15/kubernetes-setup-using-ansible-and-vagrant/
10+ ```
11+ # Inspired by https://kubernetes.io/blog/2019/03/15/kubernetes-setup-using-ansible-and-vagrant/
12+ $ vagrant up
13+ $ vagrant status
14+
15+ Current machine states:
16+
17+ k8s-master running (virtualbox)
18+ node-1 running (virtualbox)
19+ node-2 running (virtualbox)
20+ ```
1321
1422
1523#### Configure kubectl in your machine
1624```
1725# Extract kubecofig from master node
18- vagrant ssh k8s-master -c "sudo cat /etc/kubernetes/admin.conf" > kubeconf
26+ $ vagrant ssh k8s-master -c "sudo cat /etc/kubernetes/admin.conf" > kubeconf
1927
2028# Add kubeconf path to $PATH
2129# Note: KUBECONFIG only exposed to current terminal, to make it permanent add it to ~/.bashrc or /~ .zshrc.
You can’t perform that action at this time.
0 commit comments