我可以用nodeport类型而不是类型的LoadBalancer部署Kong-Proxy吗?

发布于 2025-02-04 18:43:45 字数 431 浏览 2 评论 0原文

我正在使用此YAML文件进行部署 - https://raw.githubusercontent.com/kong/kubernetes-controller/master/master/deploy/deploy/single/single/all-in--in-in-on-one-dbless.yaml

我想知道我是否可以安装安装Kong带有NodePort类型?我的企业云不允许我创建类型LoadBalancer的资源。

I am using this yaml file for deployment - https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-dbless.yaml

I'm wondering if I can install Kong with type NodePort? My enterprise cloud isn't allowing me to create resource of type LoadBalancer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

指尖上的星空 2025-02-11 18:43:45

是的,您可以做到,只需将服务类型更改为 nodePort

Kong社区中还进行了主题讨论: https://discuss.konghq.konghq .com/t/expose-kong-on-nodePort/8497

---
apiVersion: v1
kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
  name: kong-proxy
  namespace: kong
spec:
  ports:
  - name: proxy
    port: 80
    protocol: TCP
    targetPort: 8000
  - name: proxy-ssl
    port: 443
    protocol: TCP
    targetPort: 8443
  selector:
    app: ingress-kong
  type: NodePort
---

如果将NodeSelector或亲和力使用Nodeip作为DNS作为DNS,则可能需要在同一节点上处理POD调度。

您还可以在此文档中查看 kic 的文档: https ://kind.sigs.k8s.io/docs/user/ingress/

Yes, you can do it, just change the service type to NodePort.

There is also thread discussion in Kong community : https://discuss.konghq.com/t/expose-kong-on-nodeport/8497

---
apiVersion: v1
kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
  name: kong-proxy
  namespace: kong
spec:
  ports:
  - name: proxy
    port: 80
    protocol: TCP
    targetPort: 8000
  - name: proxy-ssl
    port: 443
    protocol: TCP
    targetPort: 8443
  selector:
    app: ingress-kong
  type: NodePort
---

You might need to take care of POD scheduling on the same node each time, with NodeSelector or affinity if using NodeIP as DNS somewhere in routing or so.

You can also check document of KIC in this doc : https://kind.sigs.k8s.io/docs/user/ingress/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文