Techlogs
Published in

Techlogs

Setting up Minio in K8s

Use the following to create a Mino S3 backed by rook-ceph storage

After this port-forward so that you can access Mino externally

kubectl port-forward minio-64b7c649f9-9xf5x --address 0.0.0.0 7000:9000 --namespace minio

Alternately if you have HAProxy IngressController installed in your K8s cluster you can create an Ingress and expose it

HOST=minio.10.131.232.223.nip.io
kubectl create -f - <<EOF
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: minio
namespace: minio
spec:
rules:
- host: $HOST
http:
paths:
- backend:
serviceName: minio-service
servicePort: 9000
path: /
EOF

Note:I edited the minio service from type LB to CluserIP and removed the NodePort. This may not be really needed

[root@green--1 ~]# kubectl  -n minio describe service minio-service
Name: minio-service
Namespace: minio
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"minio-service","namespace":"minio"},"spec":{"ports":[{"port":9000...
Selector: app=minio
Type: LoadBalancer --> changed this to ClusterIP
IP: 10.97.9.200
Port: <unset> 9000/TCP
TargetPort: 9000/TCP
NodePort: <unset> 31675/TCP --> removed this
Endpoints: 10.244.2.21:9000
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>

If you are using an Ingress Controller you can create an Ingress like below

# kubectl -n minio describe service minio-serviceName: minio-service Namespace: minio Labels: Annotations: kubectl.kubernetes.io/last-applied-configuration: {“apiVersion”:”v1",”kind”:”Service”,”metadata”:{“annotations”:{},”name”:”minio-service”,”namespace”:”minio”},”spec”:{“ports”:[{“port”:9000… Selector: app=minio Type: LoadBalancer → changed this to ClusterIP IP: 10.97.9.200 Port: 9000/TCP TargetPort: 9000/TCP NodePort: 31675/TCP → removed this Endpoints: 10.244.2.21:9000 Session Affinity: None External Traffic Policy: Cluster Events:
HOST=minio.10.131.232.223.nip.io
kubectl create -f — << EOF
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: minio
namespace: minio
spec:
rules:
- host: $HOST
http:
paths:
- backend:
serviceName: minio-service
servicePort: 9000
status:
loadBalancer:
ingress:
- {}
EOF

--

--

--

Programming, Software and Related

Recommended from Medium

How to root Zen Ultrafone 402 style pro

Root android phone

Why C programming language isn’t the best to start with?

How to Quickly Authenticate Users With Ruby on Rails

Minor Daily Update

AWS Well-Architected Framework Notes 2022

Landing Zone design: head in the clouds, keeping feet on the ground

Changing a field’s type in recent JDKs

Alcatel One Touch Pop C3 4033e

11111

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alex Punnen

Alex Punnen

SW Architect/programmer- in various languages and technologies from 2001 to now. https://www.linkedin.com/in/alexpunnen/

More from Medium

How to setup Horizontal Pod Autoscaling(HPA) on AWS EKS

Containerization & Its Benefits

Kubernetes Architecture from 10,000 feet

BATS (Bash Automated Testing System)