0% found this document useful (0 votes)
4 views2 pages

How Expose Application To Interntet-Ingress

This document outlines the installation of an ingress controller using Kubernetes and provides instructions for creating an ingress resource for a service. It explains how to expose the ingress resource to the internet using ngrok if an external IP address is not available. Additionally, it suggests using cloud-based load balancer services for a permanent solution to expose the ingress resource.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

How Expose Application To Interntet-Ingress

This document outlines the installation of an ingress controller using Kubernetes and provides instructions for creating an ingress resource for a service. It explains how to expose the ingress resource to the internet using ngrok if an external IP address is not available. Additionally, it suggests using cloud-based load balancer services for a permanent solution to expose the ingress resource.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Installation of ingress controller:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-


v1.0.0/deploy/static/provider/cloud/deploy.yaml

Installation of service and pod needs to be done.

Create ingress resource update your service in the ingress backend:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-app-ingress
spec:
rules:
- host: my-app.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-app-service
port:
name: http

If your Ingress resource is not showing an external IP address, it means that your Kubernetes
cluster does not have an external load balancer provisioned or you are running Kubernetes
locally on Minikube where you don't have an external load balancer available. In such cases,
you can use a tool like ngrok or localtunnel to expose your Ingress resource to the internet.
Here's how you can use ngrok to expose your Ingress resource to the internet:

1. Install ngrok by following the instructions on the ngrok website:

https://ngrok.com/download

2. Start ngrok by running the following command:


ngrok http <ingress-port> ngrok http 80

ngrok will generate a temporary public URL that you can use to access your Ingress resource
from the internet. The URL will look something like https://<random-string>.ngrok.io.

3. Update your Ingress resource to use the ngrok URL:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-app-ingress
spec:
rules:
- host: <ngrok-url>
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-app-service
port:
name: http

4. Replace <ngrok-url> with the URL generated by ngrok. For example, if ngrok
generates the URL https://abc123.ngrok.io, you would replace <ngrok-url> with
abc123.ngrok.io

5. kubectl apply -f my-app-ingress.yaml


6. Verify that the Ingress resource is working by navigating to the ngrok URL in your
browser.

Note: ngrok generates a temporary URL that will expire after a certain period of time.

Permanent Solution:
you can consider using a cloud-based load balancer service like Amazon Elastic Load
Balancer or Google Cloud Load Balancing to expose your Ingress resource to the internet.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy