如何向公众公开网址路径? /test2
应该对公众不可见,只是通过入口进行的服务呼叫。我有/test
想要指向公共URL,以便保护/test2
。
我将路径从/
更改为/test
,但是/test2
仍然公开。有什么想法吗?
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-body-size: 30m
nginx.ingress.kubernetes.io/whitelist-source-range: xxx.yyy.z.z/zz, xxx.yyy.z.z/zz
generation: 1
name: myapp
namespace: my-namespace
uid: 324u932p-sdf-asdf-asd-9832jsadf
spec:
rules:
- host: myapp.test.012345.aws.k8s.net
http:
paths:
- backend:
serviceName: myapp
servicePort: 3000
path: /test
status:
loadBalancer:
ingress:
- {}