https://github.com/mhutter/ansible-k8s-hcloud
https://github.com/mhutter/ansible-k8s-hcloud
ansible hcloud kubernetes
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mhutter/ansible-k8s-hcloud
- Owner: mhutter
- Created: 2020-01-14T10:35:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-21T10:37:29.000Z (over 6 years ago)
- Last Synced: 2025-03-23T19:17:59.001Z (about 1 year ago)
- Topics: ansible, hcloud, kubernetes
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Kubernetes on Hetzner Cloud setup =
Ansible Playbook & helper scripts to set up Kubernetes on Hetzner Cloud.
References:
- https://community.hetzner.com/tutorials/install-kubernetes-cluster
== Preparation
1. `cp hosts.yml{.example,}`
2. `cp group_vars/all.yml{.example,}`
3. Edit `hosts.yml` and `group_vars/all.yml`
== Kubeadm init
----
internal_ip="$(ifconfig ens10 | awk '/inet /{print $2}')"
kubeadm init \
--pod-network-cidr=10.244.0.0/16 \
--apiserver-cert-extra-sans "$internal_ip"
----
== Deploy CNI, CCM, CSI
On the master:
----
kubectl apply -f hcloud-config.yml
kubectl apply -f https://raw.githubusercontent.com/hetznercloud/hcloud-cloud-controller-manager/master/deploy/v1.5.0.yaml
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
----
== Install FluxCD
----
export GHUSER=mhutter
fluxctl install \
--git-user=${GHUSER} \
--git-email=${GHUSER}@users.noreply.github.com \
--git-url=git@github.com:${GHUSER}/flux-hcloud.git \
--namespace=flux | kubectl apply -f -
----
== License
MIT (see link:LICENSE[LICENSE])
---
> https://hutter.io/[Manuel Hutter] -
> GitHub https://github.com/mhutter[@mhutter] -
> Twitter https://twitter.com/dratir[@dratir]