Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

227
Visualizações
Kubernetes Ingress Flask Application

I have a simple demo Flask application that is deployed to kubernetes using minikube. I am able to access the app using the Services. But I am not able to connect using ingress.

Services.yaml

apiVersion: v1
kind: Service
metadata:
  name: services-app-service
spec:
  selector:
    app: services-app
  type: ClusterIP             
  ports:
    - protocol: TCP
      port: 5000              # External connection
      targetPort: 5000        # Internal connection

D:Path>kubectl get svc
NAME                   TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)    AGE
db                     ClusterIP   None          <none>        3306/TCP   120m
kubernetes             ClusterIP   10.20.30.1    <none>        443/TCP    3h38m
services-app-service   ClusterIP   10.20.30.40   <none>        5000/TCP   18m

I am able to access the app using minikube.

D:Path>minikube service services-app-service --url
* service default/services-app-service has no node port
* Starting tunnel for service services-app-service.
|-----------|----------------------|-------------|------------------------|
| NAMESPACE |         NAME         | TARGET PORT |          URL           |
|-----------|----------------------|-------------|------------------------|
| default   | services-app-service |             | http://127.0.0.1:50759 |
|-----------|----------------------|-------------|------------------------|
http://127.0.0.1:50759
! Because you are using a Docker driver on windows, the terminal needs to be open to run it.

Ingress.yaml

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: services-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
    - host: mydemo.info
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: services-app-service
                port:
                  number: 5000

D:Path>kubectl get ing
NAME               CLASS    HOSTS         ADDRESS        PORTS   AGE
services-ingress   <none>   mydemo.info   192.168.40.1   80      15m

Are there any additional configuration required to access the app via ingress?

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

The ingress, and ingress-dns addons are currently only supported on Linux. Currently not supported on windows. MoreInfo

enter image description here

Not Supported on Windows:

  • minikube version: v1.16.0
  • minikube version: v1.17.1
over 4 years ago · Santiago Trujillo Relatório

0

The issue is that you need to access it with a Host head of mydemo.info for that Ingress spec to work. You also need to confirm you have an Ingress Controller installed, usually ingress-nginx for new users but there are many options. Then you would look for the Ingress Controllers NodePort or LoadBalancer service and access through that.

over 4 years ago · Santiago Trujillo Relatório

0

I've been searching for ages. I confirm this doesn't work on MacOS either.

Using minikube tunnel is the only way I found.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda