【发布时间】:2021-01-28 07:10:49
【问题描述】:
当我使用入口插件 (minikube addons enable ingress) 部署入口时,它的地址设置为 192.168.49.2:
NAME CLASS HOSTS ADDRESS PORTS AGE
some-ingress <none> application.com 192.168.49.2 80, 443 86s
如何将其更改为 127.0.0.1(或外部 ip)才能接收来自外部的请求?
更新:
使用vm_driver=docker; minikube ip 返回192.168.49.2。
UPD2:入口配置:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: application-ingress
annotations:
ingress.kubernetes.io/ssl-redirect: "true"
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- application.com
secretName: tls-secret
rules:
- host: application.com
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: application-back
port:
number: 80
【问题讨论】:
-
你能分享你的 Ingress 配置吗?您是否按照任何指南进行设置?
-
@WytrzymałyWiktor 我将 Ingress 配置附加到帖子中。遵循本指南:kubernetes.io/docs/tasks/access-application-cluster/…
标签: kubernetes kubernetes-ingress minikube