https://github.com/vagmi/k8s-setup-workshop
Code for the kubernetes workshop setup
https://github.com/vagmi/k8s-setup-workshop
ansible cluster digitalocean kuberentes simple terraform
Last synced: 2 months ago
JSON representation
Code for the kubernetes workshop setup
- Host: GitHub
- URL: https://github.com/vagmi/k8s-setup-workshop
- Owner: vagmi
- Created: 2022-11-03T23:08:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-04T18:23:31.000Z (over 3 years ago)
- Last Synced: 2025-03-25T09:49:57.397Z (over 1 year ago)
- Topics: ansible, cluster, digitalocean, kuberentes, simple, terraform
- Language: HCL
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kuberenetes workshop setup
This example sets up a 3 node kubernetes cluster. It uses docker and kubeadm
on digital ocean. It is meant for teaching k8s concepts and is not meant for
for production.
You can setup the cluster with the following commands. This creates the keypair
and the inventory file.
```
export DO_TOKEN=do-xxxxx
export PREFIX=vagmi-cluster
terraform init
terraform apply -var "do_token=$DO_TOKEN" -var "prefix=$PREFIX"
```
You can run the playbook there.
```
ssh-add ./id_rsa
cd ansible
ansible-playbook -i inventory setup.yml
```
You can then ssh into the machine to check if everything works.
```
cd ..
ssh deploy@`terraform output --raw control_ip` kubectl get nodes
```