-
Notifications
You must be signed in to change notification settings - Fork 0
How to use NodePort in MinIO Service
Cesar Celis Hernandez edited this page Sep 17, 2022
·
14 revisions
- https://kind.sigs.k8s.io/docs/user/configuration/#api-server
- https://github.com/kubernetes-sigs/kind/issues/1875
- https://stackoverflow.com/questions/63850398/exposing-a-kubernetes-pod-via-service-in-kind-kubernetes-cluster
- https://porter.sh/best-practices/kind/#:~:text=By%20default%2C%20KinD%20sets%20up,0.1%20).
- https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0
- Delete any previous cluster if any
kind delete cluster
- Create the configuration file for
kind
:
-
File name:
kind-config-node-port.yaml
-
Content:
# I got this config from:
# https://github.com/kubernetes-sigs/kind/issues/1875
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
apiServerAddress: "127.0.0.1"
apiServerPort: 6443
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30080
hostPort: 30080
listenAddress: "127.0.0.1"
protocol: TCP
- containerPort: 30081
hostPort: 30081
listenAddress: "127.0.0.1"
protocol: TCP
$ kind create cluster --config=kind-config-node-port.yaml
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.24.0) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Thanks for using kind! 😊
- Install the operator:
kubectl apply -k github.com/minio/operator/
- Install the tenant:
kubectl apply -k ~/operator/examples/kustomization/tenant-lite
- Since we have one node only, remove one replica from operator so we have only one:
- Wait for Tenant to be ready:
- Then, change the service to become
NodePort
:
- Match the port of the service with the port available in your host:
- Then you can access the UI via
https://localhost:30080/login
: