尝试连接到使用 Kong 作为入口控制器的云托管 Kubernetes 服务上运行的 Jupyter Lab 容器(最终也包括其他应用程序)。接收"no Route matched with those values"
到对 Kong 的公共 IP 的 http 响应和入口控制器日志表明:
service kong/rjup2 does not have any active endpoints
no configuration change, skipping sync to Kong
部署配置:
apiVersion: apps/v1
kind: Deployment
metadata:
name: rjup2
namespace: kong
spec:
selector:
matchLabels:
run: rjup2
replicas: 1
template:
metadata:
labels:
run: rjup2
spec:
restartPolicy: Always
containers:
- name: rjup2
image: jupyter/minimal-notebook
imagePullPolicy: Always
ports:
- containerPort: 8888
protocol: TCP
服务配置:
apiVersion: v1
kind: Service
metadata:
name: rjup2
namespace: kong
spec:
selector:
app: rjup2
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 8888
protocol: TCP
入口资源配置:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: rjup2
namespace: kong
spec:
tls:
- hosts:
- <AKS API server address>
rules:
- host: <AKS API server address>
http:
paths:
- path: /
backend:
serviceName: rjup2
servicePort: 80
已在部署的API Server Address
YAML 中正确填充。在将它们合并到 Kong 的默认命名空间之前,我尝试了不同的命名空间,并且除了容器目标端口之外,还尝试将服务端口设置为 8888。
感谢您在调试时提供的任何帮助。