How to change the minio port in k8s - cniackz/public GitHub Wiki

Objective:

To change the minio port in k8s

Steps

  1. Have a cluster

  2. Have MinIO Operator installed

  3. Have a Tenant deployed already

  4. Change MinIO service port from 443 to 6000:

k edit service minio -n <tenant-namespace>
apiVersion: v1
kind: Service
metadata:
  name: minio
spec:
  ports:
    - name: https-minio
      protocol: TCP
      port: 6000 <---------- You can change the service port to use this for your applications.
      targetPort: 9000 <---- This is the target port as MinIO Pods are using 9000
  1. Expose the service via NodePort, Port-Forward, Ingress or any other mechanism.

  2. Access the minio by creating an alias using port 6000:

$ mc alias set myminio https://localhost:6000 minio minio123 --insecure
Added `myminio` successfully.

Conclusion:

If your apps, requires other port than 443, you can address that by changing the minio service to any desired port.