[英]kubernetes nginx ingress giving 503 and 404
While creating Ingress rules to the existing APIs is using TLS mandatory? 在为现有API创建Ingress规则时是否必须使用TLS?
I am getting 404 and 503 error codes to all the APIs except given without any path. 我得到了所有API的404和503错误代码,除了没有任何路径的情况下。
I am using nginx ingress controller. 我正在使用nginx入口控制器。
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: hello-world-ing
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- http:
paths:
- path: /test
backend:
serviceName: example-project
servicePort: 8085
This is the ingress rule I created: 这是我创建的入口规则:
gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.10
- version of controller gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.10
控制器版本
In K8s nginx-ingress. 在K8s Nginx元素中。 By default some nginx have we configured that may block your service.
默认情况下,我们已经配置了一些nginx来阻止您的服务。
kubectl describe configMap nginx-configuration -n ingress-nginx
https://github.com/kubernetes/ingress-nginx/blob/146db437945a130d675540285fe02fa9639ba1f0/docs/user-guide/configmap.md https://github.com/kubernetes/ingress-nginx/blob/146db437945a130d675540285fe02fa9639ba1f0/docs/user-guide/configmap.md
example-project
must be of type NodePort. example-project
必须为NodePort类型。 Because by default is ClusterIP 因为默认情况下是ClusterIP
apiVersion: v1
kind: Service
metadata:
name: example-project
...
spec:
type: NodePort
ports:
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.