目前,我正在使用 Docker 桌面与WSL2集成。我发现Docker Desktop自动为我创建了一个集群。这意味着我不必安装和使用Minikube或Kind来创建集群。问题是,如果我使用 Docker 桌面的“内置”集群,我如何启用Ingress Controller?我尝试创建一个Ingress来检查这是否有效,但正如我的猜测,它没有用。
我创建的 YAML 文件如下:
apiVersion: apps/v1
kind: Deployment
metadata:
name: webapp
spec:
minReadySeconds: 30
selector:
matchLabels:
app: webapp
replicas: 1
template:
metadata:
labels:
app: webapp
spec:
containers:
- name: webapp
image: nodejs-helloworld:v1
---
apiVersion: v1
kind: Service
metadata:
name: webapp-service
spec:
selector:
app: webapp
ports:
- name: http
port: 3000
nodePort: 30090 # only for NotPort > 30,000
type: NodePort #ClusterIP inside …Run Code Online (Sandbox Code Playgroud) 我无法连接到使用 nginx ingress 运行的应用程序(Docker Desktop win 10)。
nginx-ingress 控制器 pod 正在运行,应用程序运行良好,我已经创建了一个入口。但是,当我尝试在本地主机上连接到我的应用程序时,出现“连接被拒绝”。
我在日志中看到这个错误:
[14:13:13.028][VpnKit ][Info ] vpnkit.exe: Connected Ethernet interface f6:16:36:bc:f9:c6
[14:13:13.028][VpnKit ][Info ] vpnkit.exe: UDP interface connected on 10.96.181.150
[14:13:22.320][GoBackendProcess ][Info ] Adding vpnkit-k8s-controller tcp forward from 0.0.0.0:80 to 10.96.47.183:80
[14:13:22.323][ApiProxy ][Error ] time="2019-12-09T14:13:22-05:00" msg="Port 443 for service ingress-nginx is already opened by another service"
Run Code Online (Sandbox Code Playgroud)
我认为端口 443 被另一个应用程序使用,可能是 zscaler security 或 Skype。摘自netstat -a -b:
[svchost.exe]
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 16012
[com.docker.backend.exe]
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 8220
Run Code Online (Sandbox Code Playgroud)
我不知道如何使入口工作。请帮忙!
我的入口: …