简体   繁体   English

如何在kubernetes或docker集群中的不同应用程序之间进行网络隔离?

[英]how to do network isolation among different applications in kubernetes or in docker cluster?

We're building a platform based on microservices which managed by k8s, each user could build application based on different microservices. 我们正在建立一个基于微服务的平台,该平台由k8s管理,每个用户可以基于不同的微服务来构建应用程序。 how to do isolation for different applications to avoid harm effective between them, is the network isolation ok or any better solution ? 如何为不同的应用程序进行隔离,以避免它们之间的伤害,网络隔离还可以,还是更好的解决方案?

You need network policy applied in K8s 您需要在K8s中应用网络策略

https://kubernetes.io/docs/user-guide/networkpolicies/ https://kubernetes.io/docs/user-guide/networkpolicies/

A network policy is a specification of how selections of pods are allowed to communicate with each other and other network endpoints. 网络策略是有关如何允许Pod的选择与彼此以及其他网络端点进行通信的规范。

that depends what kind of network isolation you need? 这取决于您需要哪种网络隔离? 1.layer 7:you can use network policy to change iptables rules. 1.layer 7:您可以使用网络策略更改iptables规则。 2.layer 2:you can use kuryr to use neutron's vlan or vxlan network. 2.layer 2:您可以使用kuryr使用中子的vlan或vxlan网络。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 Kubernetes 集群与 Docker 网络互连 - Interconnect a Kubernetes cluster with a Docker network 如何在集群中的不同机器之间共享 docker 个图像? - How to share docker images among different machines in a cluster? 如何在带有绒布网络的kubernetes集群中使用docker运行 - how to use docker run in kubernetes cluster with flannel network 不同主机之间的Docker容器中的RabbitMQ群集 - RabbitMQ Cluster in Docker Container among different hosts 不同数据中心之间的Docker覆盖网络 - Docker overlay network among different datacenters 了解Docker网络隔离 - Understanding Docker network isolation 如何从运行在同一 Kube.netes 集群中的容器连接到 Docker,它在 Kube.netes 集群中的主机虚拟机上运行? - How do I connect to Docker, running on host VMs in a Kubernetes cluster from a container running in the same Kubernetes cluster? 如何使用Docker / Kubernetes为PostgreSQL故障转移群集建模? - How do I model a PostgreSQL failover cluster with Docker/Kubernetes? 如何在 Docker 桌面 Kubernetes 集群上找到主 IP? - How do I find the master IP on Docker Desktop Kubernetes Cluster? kubernetes集群上的单独应用程序 - separate applications on kubernetes cluster
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM