112 lines
2.5 KiB
Plaintext
112 lines
2.5 KiB
Plaintext
|
|
##helm
|
|
helm repo add minio https://charts.min.io/
|
|
helm repo update
|
|
|
|
|
|
##values.yaml:
|
|
mode: distributed
|
|
|
|
replicas: 2
|
|
|
|
drivesPerNode: 1
|
|
|
|
persistence:
|
|
enabled: true
|
|
storageClass: csi-rbdfs-sc # 👈 IL TUO STORAGE CLASS
|
|
size: 50Gi
|
|
|
|
resources:
|
|
requests:
|
|
memory: 1Gi
|
|
cpu: 500m
|
|
limits:
|
|
memory: 2Gi
|
|
cpu: 1
|
|
|
|
rootUser: minioadmin
|
|
rootPassword: KAYQE1QA7uwUZ8uI
|
|
|
|
service:
|
|
type: ClusterIP
|
|
|
|
ingress:
|
|
enabled: false
|
|
|
|
consoleService:
|
|
type: ClusterIP
|
|
|
|
##Deploy
|
|
helm install minio minio/minio -n minio --create-namespace -f minio_values.yaml
|
|
|
|
|
|
Accesso:
|
|
kubectl port-forward svc/minio -n minio 9000
|
|
kubectl port-forward svc/minio-console -n storage 9001
|
|
|
|
##per pod us nodi diversi
|
|
affinity:
|
|
podAntiAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
- labelSelector:
|
|
matchExpressions:
|
|
- key: app
|
|
operator: In
|
|
values:
|
|
- minio
|
|
topologyKey: "kubernetes.io/hostname"
|
|
|
|
|
|
#################INFO##########################
|
|
|
|
NAME: minio
|
|
LAST DEPLOYED: Sun Mar 29 16:23:17 2026
|
|
NAMESPACE: minio
|
|
STATUS: deployed
|
|
REVISION: 1
|
|
TEST SUITE: None
|
|
NOTES:
|
|
MinIO can be accessed via port 9000 on the following DNS name from within your cluster:
|
|
minio.minio.cluster.local
|
|
|
|
To access MinIO from localhost, run the below commands:
|
|
|
|
1. export POD_NAME=$(kubectl get pods --namespace minio -l "release=minio" -o jsonpath="{.items[0].metadata.name}")
|
|
|
|
2. kubectl port-forward $POD_NAME 9000 --namespace minio
|
|
|
|
Read more about port forwarding here: http://kubernetes.io/docs/user-guide/kubectl/kubectl_port-forward/
|
|
|
|
You can now access MinIO server on http://localhost:9000. Follow the below steps to connect to MinIO server with mc client:
|
|
|
|
1. Download the MinIO mc client - https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart
|
|
|
|
2. export MC_HOST_minio-local=http://$(kubectl get secret --namespace minio minio -o jsonpath="{.data.rootUser}" | base64 --decode):$(kubectl get secret --namespace minio minio -o jsonpath="{.data.rootPassword}" | base64 --decode)@localhost:9000
|
|
|
|
###svc nodeport per accessi backup etc
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
meta.helm.sh/release-name: minio
|
|
meta.helm.sh/release-namespace: minio
|
|
labels:
|
|
app: minio
|
|
release: minio
|
|
name: minio-nodeport
|
|
namespace: minio
|
|
spec:
|
|
ports:
|
|
- name: http
|
|
nodePort: 30877
|
|
port: 9000
|
|
protocol: TCP
|
|
targetPort: 9000
|
|
selector:
|
|
app: minio
|
|
release: minio
|
|
sessionAffinity: None
|
|
type: NodePort
|
|
|
|
|