<p>I have setup MinIO with Kubernetes (K3s) in one node.</p>
<p>Command <code>kubectl logs mypod-0 -n minio</code> returns the following:</p>
<ul>
<li><p>API: <a href="http://10.42.0.14:9000" rel="nofollow noreferrer">http://10.42.0.14:9000</a>  <a href="http://127.0.0.1:9000" rel="nofollow noreferrer">http://127.0.0.1:9000</a></p>
</li>
<li><p>Console: <a href="http://10.42.0.14:41989" rel="nofollow noreferrer">http://10.42.0.14:41989</a> <a href="http://127.0.0.1:41989" rel="nofollow noreferrer">http://127.0.0.1:41989</a></p>
</li>
</ul>
<p>I have access to the console from the second link and by using python I can list the buckets inside minio with:</p>
<pre><code>import logging
from minio import Minio
from minio.error import S3Error

# execute from IDE terminal
minio = Minio(
    '10.42.0.14:9000',
    access_key='chesAccesskeyMinio',
    secret_key='chesSecretkey',
    secure=False,
)


def list_all_buckets():
    bucket_list = minio.list_buckets()
    for bucket in bucket_list:
        objects = minio.list_objects(bucket.name, recursive=True)
        print (bucket.name)

if __name__ == '__main__':
    try:
        list_all_buckets()
    except S3Error as exc:
        print(&quot;error occurred.&quot;, exc)
        logging.critical(&quot;Object storage not reachable&quot;)
</code></pre>
<p>My question is how to expose this IP to be accesible from outside my network (both he console and the API).
Do I have to use ingress?</p>
<p><strong>UPDATED based on answer and comments</strong></p>
<p>I have two services</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: ches
  namespace: minio
  labels:
    app: ches
spec:
  clusterIP: None
  selector:
    app: ches
  ports:
  - port: 9011
    name: ches
---
apiVersion: v1
kind: Service
metadata:
  name: ches-service
  namespace: minio
  labels:
    app: ches
spec:
  type: LoadBalancer
  selector:
    app: ches
  ports:
  - port: 9012
    targetPort: 9011
    protocol: TCP
</code></pre>
<p>and then I created an Ingress using</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minio
  namespace: minio
spec:
  rules:
  - host: s3.example.com
    http:
      paths:
      - backend:
          service:
            name: ches-service
            port:
              number: 9000
        path: /
        pathType: Prefix
</code></pre>
<p>Command <code>kubectl describe Ingress minio -n minio</code> results in:</p>
<pre><code>Name:             minio
Namespace:        minio
Address:          192.168.1.14
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host            Path  Backends
  ----            ----  --------
  s3.example.com  
                  /   ches-service:9000 (10.42.0.14:9011)
Annotations:      &lt;none&gt;
Events:           &lt;none&gt;
</code></pre>
<p>However I cannot access <code>s3.example.com</code>.</p>
<p>Am I missing something here?</p>

<p>Yes, an Ingress would allow you to expose MinIO to clients outside your clusters SDN.</p>
<p>You probably have a Service object already (if not, you need one, Ingress points to Service, which resolves to Pods).</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minio
spec:
  rules:
  - host: s3.example.com
    http:
      paths:
      - backend:
          service:
            name: minio-api
            port:
              number: 9000
        path: /
        pathType: Prefix
</code></pre>
<p>If you don't have/want to use an ingresscontroller, you could use a NodePort service:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: minio-nodeport
spec:
  ports:
  - name: http
    port: 9000
    targetPort: 9000
  selector:
    name: my-minio-pod
  type: NodePort
</code></pre>
<p>NodePorts services are allocated a unique port (within a range/could vary depending on your cluster configuration). When connecting to any node of your cluster, on that port, we would be redirected to any pod matching that Services selector.</p>
<pre><code>$&gt; kubectl get svc
my-nodeport-svc  NodePort 10.233.7.160 &lt;none&gt; 9000:32133/TCP
</code></pre>
<p>Getting my service, after its creation, I can see that I can reach port 9000 (in SDN), when connecting to port 32133 (outside SDN). You can &quot;kubectl get nodes -o wide&quot;, to get a list of your nodes IP addresses, all of which would forward connections to your Pods</p>
