kubernetes入口未公开的URL路径

时间:2019-12-09 19:10:31

标签: kubernetes kubernetes-ingress

如何向公众公开网址路径? /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:
    - {}

0 个答案:

没有答案