Mik*_*ike 8 google-cloud-platform kubernetes google-kubernetes-engine
我很惊讶
我有一个演出和制作环境。两种环境具有相同的部署,服务,入口,防火墙规则,并且都在200上使用/。
但是,在打开暂存环境并设置相同的入口后,暂存服务将失败 Some backend services are in UNKNOWN state。生产仍在进行中。
前端和后端Pod都可以在GKE上使用。我已经手动测试了健康检查,当我拜访时这些检查通过了/。
我看不到指向正确方向的日志或gcp文档。我可能会打破什么?
ingress.yaml:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: fanout-ingress
annotations:
kubernetes.io/ingress.global-static-ip-name: "STATIC-IP"
spec:
backend:
serviceName: frontend
servicePort: 8080
tls:
- hosts:
- <DOMAIN>
secretName: staging-tls
rules:
- host: <DOMAIN>
http:
paths:
- path: /*
backend:
serviceName: frontend
servicePort: 8080
- path: /backend/*
backend:
serviceName: backend
servicePort: 8080
Run Code Online (Sandbox Code Playgroud)
frontend.yaml:
apiVersion: v1
kind: Service
metadata:
labels:
app: frontend
name: frontend
namespace: default
spec:
ports:
- nodePort: 30664
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: frontend
type: NodePort
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
generation: 15
labels:
app: frontend
name: frontend
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
selector:
matchLabels:
app: frontend
minReadySeconds: 5
template:
metadata:
labels:
app: frontend
spec:
containers:
- image: <our-image>
name: frontend
ports:
- containerPort: 8080
protocol: TCP
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 3
Run Code Online (Sandbox Code Playgroud)
昨天甚至本指南https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer
没有用。不知道发生了什么,但即使等待 30 分钟 + 入口报告后端的 UNKNOWN 状态。
24 小时后,情况似乎好多了。L7 http ingress 可以工作,但在报告健康的后端时有很大的延迟。
| 归档时间: |
|
| 查看次数: |
3768 次 |
| 最近记录: |