无法连接到 AKS 服务终结点
Not able to connect to an AKS Service Endpoint
根据我的问题 ,我现在遇到无法连接到外部端点的问题。我的 YAML 文件在这里:
apiVersion: v1
kind: Pod
spec:
containers:
- name: dockertest20190205080020
image: dockertest20190205080020.azurecr.io/dockertest
ports:
- containerPort: 443
metadata:
name: my-test
labels:
app: app-label
---
kind: Service
apiVersion: v1
metadata:
name: test-service
spec:
selector:
app: app-label
type: LoadBalancer
ports:
- protocol: TCP
port: 443
我现在可以在发出命令时看到外部 IP:
kubectl get service test-service --watch
但是,如果我尝试连接到该 IP,则会出现超时异常。我试过 运行 仪表板,它说一切正常 运行。接下来我可以做什么来诊断这个问题?
在这种情况下,通过在端口 80 上公开容器并从外部端口 6666 路由到它来解决问题。
根据我的问题
apiVersion: v1
kind: Pod
spec:
containers:
- name: dockertest20190205080020
image: dockertest20190205080020.azurecr.io/dockertest
ports:
- containerPort: 443
metadata:
name: my-test
labels:
app: app-label
---
kind: Service
apiVersion: v1
metadata:
name: test-service
spec:
selector:
app: app-label
type: LoadBalancer
ports:
- protocol: TCP
port: 443
我现在可以在发出命令时看到外部 IP:
kubectl get service test-service --watch
但是,如果我尝试连接到该 IP,则会出现超时异常。我试过 运行 仪表板,它说一切正常 运行。接下来我可以做什么来诊断这个问题?
在这种情况下,通过在端口 80 上公开容器并从外部端口 6666 路由到它来解决问题。