Get the App
SLTechnology News&Howtos  ›  Servers  › 

Kubernetes deployment solution across computer rooms

Shulou Source: shulou.com Published: 2022-06-03 00:40:55 10月02日 Update

Since the business needs to be distributed in multiple data centers, it will be very inconvenient to split and switch traffic if you use one deployment deployment. Therefore, consider splitting the service by region.

1. Define the region of the server through node label, for example:

Kubectl label nodes vm101 region=bj

Kubectl label nodes vm102 region=sh

Kubectl label nodes vm103 region=mirror

For each region, a deployment and svc,deployment are deployed on the specified node through the label of node.

├── all.service.yaml-all node can get the endpoint list of gz/sh/mirror

├── gz

│ ├── deployment.yaml

│ └── service.yaml

├── ingress.yaml

├── mirror

│ ├── deployment.yaml

│ └── service.yaml

├── nginx.conf

├── php_conf.cm.yaml

└── sh

├── deployment.yaml

└── service.yaml

Tags: Regions nodes services computer rooms services multiple servers traffic switching solutions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info vpn NVidia Huawei