https://github.com/jonas-be/k8s-setup-scripts
https://github.com/jonas-be/k8s-setup-scripts
bash k8s kubernetes kubernetes-setup
Last synced: 29 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jonas-be/k8s-setup-scripts
- Owner: jonas-be
- License: mit
- Created: 2023-03-21T11:19:23.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-14T22:05:02.000Z (about 3 years ago)
- Last Synced: 2024-12-29T04:53:27.941Z (over 1 year ago)
- Topics: bash, k8s, kubernetes, kubernetes-setup
- Language: Shell
- Homepage:
- Size: 24.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# K8s setup scripts
This repository includes some bash scripts to set up a Kubernetes cluster.
The scripts are made for VMs only with debian installed.
> **Warning**
> The repo follows the [kubernetes docs](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/).
> You should always check if some steps changed!
> Go through the [kubernetes docs](https://kubernetes.io) for official installation instructions.
> **Warning**
> You eventually have to Update versions!
## Requirements
- Debian or Ubuntu
- Access to root user
- be able to make some DNS records _(only for multiple control plane topology)_
## Versions
Currently used Version in the scripts:
- Kubernetes: stable-1.25
- Containerd: version from [Docker download](https://download.docker.com/linux/)
- Use [Calico](https://projectcalico.org) v3.24 as Pod network
## Before you start
> **Note**
> This **only** required for topologies with multiple control planes
You have to create an `A` record for each **control plane node**.
This should look something like this _(example with 3 control planes)_:
```
your.domain.example. 600 IN A
your.domain.example. 600 IN A
your.domain.example. 600 IN A
```
Next you have to change the `controlPlaneEndpoint` in the `kubeadm-config.yaml`, to your domain.
You can find the file creation, in the `initialize-multiple-control-plane.sh` script.
## node-setup-*.sh
Setup everything to run Kubernetes control plane or worker
### What happens
- Update system
- Install [containerd](https://containerd.io)
- Configure Kubernetes required stuff
- Install
- kubelet
- kubeadm
- kubectl
## initialize-one-control-plane.sh
Initialize control plane for topology with **ONE** control plane
### What happens
- Create kubeadm-config.yaml
- kubeadm init
- Set .kube config
- Apply pod network
## initialize-multiple-control-plane.sh
Initialize control plane for topology with **multiple** control planes.
### What happens
- Create kubeadm-config.yaml
- kubeadm init
- Set .kube config
- Apply pod network