Kubernetes를 처음 사용하고 있으며 포함 된 GCE 수신 컨트롤러를 사용하여 Google 컨테이너 엔진에서 TLS를 사용하여 HTTP로드 균형 조정을 시도하고 있습니다. 내가 가진 오류는 심지어 Google's official tutorial 다음에 반복됩니다. 가독성을 위해 나는 config.yaml
의 절차를 요약 : 다음Kubernetes/GCE Ingress 컨트롤러가 작동하지 않습니다.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 1
template:
metadata:
labels:
name: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
name: nginx
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
selector:
name: nginx
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: basic-ingress
spec:
backend:
serviceName: nginx
servicePort: 80
:
kubectl create -f config.yaml
export NODE_PORT=$(kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services nginx)
gcloud compute firewall-rules create allow-130-211-0-0-22 --source-ranges 130.211.0.0/22 --allow tcp:$NODE_PORT
curl <ip_of_load_balancer>
(이것은 모두 적용됩니다, 그래서 내가 방화벽 규칙에 태그를 제거).
하지만 502 Server Error
이 있는데, according to the docs은 부트 스트래핑이 가능할 수 있음을 의미합니다 (하지만 항상 이와 같이 유지됩니다). 나는 콘솔에서 백엔드가 건강에 해롭다는 것을 알 수있다. (위의 완료)
- 방화벽 규칙
- 서비스 (200)로 응답해야합니다 (그러나 나는 통해 로컬
nginx
이미지와 서비스를 테스트 :이 일을 방지하기 위해 문서에서이 필요
그래서이 오류의 원인은 무엇이며 어떻게 더 디버깅 할 수 있습니까?
구성에 대한 yaml 파일을 만드는 것으로 시작할 수 있습니까? 그렇다면 그곳에있는 모든 것이 더 분명합니다. –
@NorbertvanNobelen 편집 – user7384