rev*_*ker 5 apache amazon-web-services kubernetes
我已经在容器中部署了一个 apache httpd 服务器,并试图通过 LoadBalancer 在外部公开它。虽然当我尝试访问负载均衡器公开的外部 URL 时,我可以登录到本地主机并获得预期的响应 (curl -X GET localhost),但我从服务器收到了一个空回复:
curl -X GET ad8d14ea0ba9611e8b2360afc35626a3-553331517.us-east-1.elb.amazonaws.com:5000
curl: (52) Empty reply from server
Run Code Online (Sandbox Code Playgroud)
知道我错过了什么 - 是否有某种我不知道的额外重定向?
yaml 在这里:
apiVersion: apps/v1
kind: Deployment
metadata:
name: apache
labels:
app: apache
spec:
replicas: 1
selector:
matchLabels:
pod: apache
template:
metadata:
name: apachehost
labels:
pod: apache
spec:
containers:
- name: apache
image: myrepo/apache2
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: apache
labels:
app: apache
spec:
type: LoadBalancer
selector:
pod: apache
ports:
- name: port1
port: 5000
targetPort: 80
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
743 次 |
| 最近记录: |