CCE Security Group
A security group, essentially a virtual firewall, defines access policies for Baidu Cloud Compute within the same virtual private cloud with similar security protection and trust requirements. It offers state detection and data packet filtering, helping to segment security domains in the cloud and serving as a key network security isolation measure.
You can control the ingress and egress traffic of Baidu Cloud Compute within a security group by configuring security group rules. For more introductions to security groups, please refer to Security Group.
Prerequisites for use
The Cloud Container Engine (CCE) introduces optimized security group usage for clusters. Users can choose to either "Automatically create a default security group" or "Use an existing security group." For general scenarios, it’s recommended to opt for the default security group, as it simplifies configuration without requiring detailed rule management and keeps costs low. For more specific needs, you can refer to the default group's rules to ensure proper inter-group communication, avoiding issues like cluster access failures caused by misconfigured group rules, which could affect cluster operations.
Description of CCE default security groups
As a general container platform, CCE sets security group rules applicable to general scenarios. When a cluster is created, separate security groups will be automatically created for master nodes and worker nodes. The name of the security group for master nodes is: {Cluster ID}-master-{Random ID}; the name of the security group for Worker nodes is: {Cluster ID}-worker-{Random ID}. For clusters using the VPC-ENI container network mode, an additional ENI security group will be created, named {Cluster ID}-eni-{Random ID}.
Default security group rules for workers
To ensure the normal operation of cluster and node functions and maintain normal network connectivity between clusters and nodes, the default security group rules for workers automatically created by CCE are as follows:
| Direction | Protocol | Network segment | Ports | IP type | Policy | Description |
|---|---|---|---|---|---|---|
| Ingress | ALL | Cluster network CIDR (VPC network segment) | 1-65535 | IPv4 | Allowed | Enable communication between all nodes within the cluster network |
| Ingress | ALL | Container network CIDR | 1-65535 | IPv4 | Allowed | Enable communication between all Pods within the cluster container network (container network mode is "VPC routing") |
| Ingress | ALL | 100.64.230.0/24 | 1-65535 | IPv4 | Allowed | Enable communication between the cluster and the CCE control plane subnet |
| Ingress | TCP | ALL | NodePort range | IPv4 | Allowed | Enable communication between all NodePort services within the cluster based on TCP |
| Ingress | UDP | ALL | NodePort range | IPv4 | Allowed | Enable communication between all NodePort services within the cluster based on TCP |
| Egress | ALL | ALL | 1-65535 | IPv4 | Allowed | Enable all external communication from the cluster |
| Ingress | TCP | ALL | 22 | IPv4 | Allowed | Enable public network SSH login ports |
| Ingress | ICMP | ALL | Not applicable | IPv4 | Allowed | Enable ping operation |
Default security group rules for ENI
In the "VPC-ENI" container network mode, to ensure normal network connectivity between Pods on cluster nodes, the default security group rules for ENI automatically created by CCE are as follows:
| Direction | Protocol | Network segment | Ports | IP type | Policy | Description |
|---|---|---|---|---|---|---|
| Ingress | ALL | Cluster network CIDR (VPC network segment) | 1-65535 | IPv4 | Allowed | Enable communication between all nodes within the cluster network |
| Ingress | ALL | 100.64.230.0/24 | 1-65535 | IPv4 | Allowed | Enable communication between the cluster and the CCE control plane subnet |
| Ingress | TCP | ALL | NodePort range | IPv4 | Allowed | Enable communication between all NodePort services within the cluster based on TCP |
| Ingress | UDP | ALL | NodePort range | IPv4 | Allowed | Enable communication between all NodePort services within the cluster based on TCP |
| Egress | ALL | ALL | 1-65535 | IPv4 | Allowed | Enable all external communication from the cluster |
| Ingress | TCP | ALL | 22 | IPv4 | Allowed | Enable public network SSH login ports |
| Ingress | ICMP | ALL | Not applicable | IPv4 | Allowed | Enable ping operation |
Default security group for masters
To ensure the normal operation of cluster and node functions and maintain normal network connectivity between clusters and nodes, the default security group rules for the master automatically created by CCE are as follows:
| Direction | Protocol | Network segment | Ports | IP type | Policy | Description |
|---|---|---|---|---|---|---|
| Ingress | ALL | Cluster network CIDR (VPC network segment) | 1-65535 | IPv4 | Allowed | Enable communication between all nodes within the cluster network |
| Ingress | ALL | Container network CIDR | 1-65535 | IPv4 | Allowed | Enable communication between all Pods within the cluster container network (container network mode is "VPC routing") |
| Ingress | ALL | 100.64.230.0/24 | 1-65535 | IPv4 | Allowed | Enable communication between the cluster and the CCE control plane subnet |
| Ingress | TCP | ALL | NodePort range | IPv4 | Allowed | Enable communication between all NodePort services within the cluster based on TCP |
| Ingress | UDP | ALL | NodePort range | IPv4 | Allowed | Enable communication between all NodePort services within the cluster based on TCP |
| Egress | ALL | ALL | 1-65535 | IPv4 | Allowed | Enable all external communication from the cluster |
| Ingress | TCP | ALL | 22 | IPv4 | Allowed | Enable public network SSH login ports |
| Ingress | ICMP | ALL | Not applicable | IPv4 | Allowed | Enable ping operation |
| Ingress | TCP | ALL | 6443 | IPv4 | Allowed | Enable public network access to the apiserver |
Default security group rules for IPv6 clusters
If the cluster enables an IPv6 dual-stack network, the following additional security group rules will be created for the cluster:
| Direction | Protocol | Network segment | Ports | IP type | Policy | Description |
|---|---|---|---|---|---|---|
| Ingress | ALL | Cluster network IPv6 CIDR (VPC network segment) | 1-65535 | IPv6 | Allowed | Enable IPv6 address-based communication between all nodes within the cluster network |
| Ingress | TCP | ALL | NodePort range | IPv6 | Allowed | Enable TCP and IPv6 address-based communication between all NodePort services within the cluster |
| Ingress | UDP | ALL | NodePort range | IPv6 | Allowed | Enable UDP and IPv6 address-based communication between all NodePort services within the cluster |
| Egress | ALL | ALL | 1-65535 | IPv6 | Allowed | Enable all external communication from the cluster |
