← Back to Blog

🐳 Why Use Ingress in Kubernetes with Minio?

🐳 Why Use Ingress in Kubernetes with Minio? 🐳 When working with Kubernetes, managing access to your services becomes crucial, especially when you want to expose a service externally.

🐳 Why Use Ingress in Kubernetes with Minio?


🐳

When working with Kubernetes, managing access to your services becomes crucial, especially when you want to expose a service externally. In this post, we'll explore why using Ingress is a smart choice for your Kubernetes setup when deploying services like Minio.

why-use-ingress-1.png


🎯 What Is Ingress?

Kubernetes Ingress is a collection of rules that allow external HTTP and HTTPS access to cluster services. It provides a way to expose your services to the outside world without needing to create an individual service with a load balancer for each one. Instead, you define a set of routing rules that Kubernetes Ingress Controller uses to direct traffic.

minikube service minio-console --url -n minio


πŸš€ Why Ingress Instead of NodePort?

In the screenshot above, we can see a service like minio-console without an external IP, meaning it is only accessible within the Kubernetes cluster. While using NodePort or ClusterIP gives us access, it might not be ideal for external, public-facing services. Here's why you should consider using Ingress:

  • Centralized Control: Ingress allows centralized management of routing rules. You can expose multiple services through a single external IP address, each with different paths or subdomains.

  • SSL Termination: Ingress can handle SSL/TLS termination, making your services secure without having to configure SSL for each service individually.

  • Load Balancing: By using Ingress, you can apply load-balancing rules to distribute traffic across multiple backend pods.


πŸ”₯ How Ingress Simplifies Minio Access

Imagine you have several services like Minio, a database, and a web frontend running in the same Kubernetes cluster. Without Ingress, you'd have to expose each service using a NodePort, which means exposing high-range ports (30000-32767). This is not ideal from a security or management perspective. Instead, by setting up an Ingress resource, you can:

  • Expose Minio at https://minio.yourdomain.com

  • Expose Minio Console at https://minio-console.yourdomain.com

  • Expose other services under similar subdomains or paths like /minio-console


πŸ› οΈ Configuring Ingress for Minio

Here’s an example of what an Ingress resource for Minio might look like:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minio-ingress
namespace: minio
spec:
rules:
- host: "minio.yourdomain.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: minio
port:
number: 9000
- host: "console.minio.yourdomain.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: minio-console
port:
number: 9001

This YAML defines two routes: one for Minio's storage service and another for the Minio Console, each under a different subdomain. With this setup, Ingress simplifies routing and removes the need for individual NodePort services.


πŸ’‘ Conclusion

Ingress is a powerful tool in Kubernetes that makes managing external access to services like Minio efficient and scalable. By using it, you centralize your routing rules, secure your services with SSL, and optimize resource allocation without the complexity of multiple NodePorts.


πŸ”— Connect with me:


This post leverages the screenshot for visual aid, and you can further expand on configuring Ingress controllers like Nginx or Traefik, depending on your Kubernetes setup.

Let me know if you'd like to tweak or add more details to the post!

UPDATE

It looks like you have uploaded another screenshot, likely showing the Minikube command to expose the minio-console service. Here's an updated snippet to add to the blog post for better clarity on how you're exposing the Minio Console service using Minikube.


πŸ› οΈ Exposing Minio Console Using Minikube

To expose the Minio Console in a development environment like Minikube, you can use the following command:

minikube service minio-console --url -n minio

As shown in the screenshot, Minikube helps to expose the service by generating a local URL (e.g., http://127.0.0.1:52582). This allows you to access the Minio Console through a browser locally on your machine, which is particularly useful during development when you don’t need a public-facing service.

🚨 Note: The message "Because you are using a Docker driver on darwin, the terminal needs to be open to run it." indicates that you need to keep the terminal open while accessing the service, which is typical when using the Docker driver on macOS (Darwin).

For production setups, however, it's better to use an Ingress to avoid limitations like needing to keep the terminal open.


This section can follow the explanation of the Ingress benefits and provide insight into how Minikube exposes services for testing.

Let me know if you want to make any other adjustments!


Imported from rifaterdemsahin.com Β· 2025