我的服务未将流量连接/定向到广告连播。我已经捣乱了#39;进入pod并且服务器正常工作但服务超时。
部署文件:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: venues
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
minReadySeconds: 5
template:
metadata:
labels:
app: venues
version: v0.3
spec:
containers:
- name: venues
image: some-image
imagePullPolicy: Always
ports:
- containerPort: 3000
name: http-server
服务档案:
apiVersion: v1
kind: Service
metadata:
name: venues
labels:
name: venues
spec:
type: LoadBalancer
ports:
- port: 3000
targetPort: 3000
protocol: TCP
selector:
name: venues
答案 0 :(得分:3)
您在服务中的选择器是错误的:您需要选择部署的标签,而不是容器名称。所以
selector:
app: venues
应该有效。如果需要,您也可以选择添加version: v0.3
。