Start to write dev guide

This commit is contained in:
Pierre HUBERT 2025-03-06 20:41:22 +01:00
parent eb4eda83c8
commit 8d8942d360
2 changed files with 138 additions and 0 deletions

49
docs/DevelopmentSetup.md Normal file
View File

@ -0,0 +1,49 @@
# Setup for development
This guide will present you how to prepare your computer to update features of MinioK8SBucket
## Install Minikube
First, you need to install Minikube on your computer to have a K8S environment. In order to do this, please follow the official instructions: https://minikube.sigs.k8s.io/docs/start
## Start Minikube
You will then need to start Minikube using the following command:
```bash
minikube start
```
You can then make sure that Minikube is working properly:
```
minikube kubectl get nodes
```
You should get a response similar to this one:
```
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane 2m16s v1.32.0
```
## Clone repository
Clone this repository using:
```bash
https://gitea.communiquons.org/pierre/MinioK8sBuckets
```
!!! warning "Gitea account request"
If you want to get a Gitea account to make pull request on this repository, you will need to contact me at: `pierre.git@communiquons.org`
## Deploy Minio
You will then need to deploy Minio in Minikube. Apply the Minio deployment located at the in MinioK8SBucket repository:
```bash
minikube kubectl -- apply -f yaml/minio-dev-deployment.yml
```
Check for launching of pod:
```bash
minikube kubectl -- get pods -w
```

View File

@ -0,0 +1,89 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio
labels:
app: minio
spec:
replicas: 1
selector:
matchLabels:
app: minio
template:
metadata:
labels:
app: minio
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: minio
containers:
- name: minio
image: minio/minio
imagePullPolicy: Always
ports:
- containerPort: 9000
protocol: TCP
name: api
- containerPort: 9001
protocol: TCP
name: console
args:
- server
- /data
- --console-address
- ":9090"
env:
- name: MINIO_ROOT_USER
value: minioadmin
- name: MINIO_ROOT_PASSWORD
value: minioadmin
volumeMounts:
- mountPath: "/data"
name: data
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: minio
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
capacity:
storage: 5Gi
hostPath:
path: /data/minio/
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
---
apiVersion: v1
kind: Service
metadata:
name: minio
labels:
app: minio
spec:
type: LoadBalancer
selector:
app: minio
ports:
- name: api
port: 9000
targetPort: api
- name: console
port: 9001
targetPort: console
externalTrafficPolicy: Local