eolab:crunchy_cloud:step_by_step:start
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| eolab:crunchy_cloud:step_by_step:start [2024/12/18 11:25] – removed - external edit (Unknown date) 127.0.0.1 | eolab:crunchy_cloud:step_by_step:start [2024/12/18 11:25] (current) – ↷ Page moved from step_by_step:start to eolab:crunchy_cloud:step_by_step:start jan.sonntag | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | **The following is a step by step guide to install and setup Kubernetes with Network Storage on your own hardware.** | ||
| + | |||
| + | ==== 1. Install MicroK8s ==== | ||
| + | Install a lightweight Kubernetes distribution: | ||
| + | sudo snap install microk8s --classic | ||
| + | |||
| + | Check the installation status and wait for the Kubernetes services to initialize: | ||
| + | microk8s status --wait-ready | ||
| + | |||
| + | ==== 2. Enable Required Add-ons in MicroK8s ==== | ||
| + | List available and installed add-ons: | ||
| + | microk8s status | ||
| + | |||
| + | Enable necessary add-ons (replace [add-on name] with dns, hostpath-storage, | ||
| + | microk8s enable [add-on name] | ||
| + | |||
| + | ==== 3. Configure MetalLB ==== | ||
| + | Enable MetalLB: | ||
| + | microk8s enable metallb | ||
| + | |||
| + | Provide an IP range for the load balancer when prompted **for example:** | ||
| + | 10.244.0.1-10.244.0.10 | ||
| + | |||
| + | ==== 4. Install NFS CSI Driver ==== | ||
| + | Add the NFS CSI driver Helm chart repository: | ||
| + | microk8s helm3 repo add csi-driver-nfs https:// | ||
| + | microk8s helm3 repo update | ||
| + | |||
| + | Install the Helm chart for the NFS CSI driver: | ||
| + | microk8s helm3 install csi-driver-nfs csi-driver-nfs/ | ||
| + | |||
| + | Wait for the NFS CSI driver pods to be ready: | ||
| + | microk8s kubectl wait --for=condition=ready pod -l app.kubernetes.io/ | ||
| + | |||
| + | ==== 5. Create and Apply NFS Storage Class ==== | ||
| + | Create a **storageclass.yaml** file with the following content: | ||
| + | apiVersion: storage.k8s.io/ | ||
| + | kind: StorageClass | ||
| + | metadata: | ||
| + | name: nfs-csi | ||
| + | provisioner: | ||
| + | parameters: | ||
| + | server: < | ||
| + | share: < | ||
| + | reclaimPolicy: | ||
| + | mountOptions: | ||
| + | - hard | ||
| + | - nfsvers=4.1 | ||
| + | |||
| + | Replace **< | ||
| + | |||
| + | Apply the StorageClass configuration: | ||
| + | microk8s kubectl apply -f storageclass.yaml | ||
| + | | ||
| + | |||
| + | This will install Kubernetes and all the necessary configuration required for your cluster. Now the cluster is ready for any application you want to install and run on it. | ||