Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Cloud Container Engine/ User Guide (Ankara Region)/ FAQs/ Networking/ Network Planning/ How Can I Configure a Security Group Rule in a Cluster?

How Can I Configure a Security Group Rule in a Cluster?

Updated on 2024-12-04 GMT+08:00

CCE is a universal container platform. Its default security group rules apply to common scenarios. When a cluster is created, a security group is automatically created for the master node and worker node, separately. The security group name of the master node is {Cluster name}-cce-control-{Random ID}, and the security group name of the worker node is {Cluster name}-cce-node-{Random ID}.

You can log in to the management console, choose Service List > Networking > Virtual Private Cloud. On the page displayed, choose Access Control > Security Groups in the navigation pane, locate the security group of the cluster, and modify the security group rules as required.

The default security group rules of the clusters using different networks are as follows:

NOTICE:
  • Modifying or deleting security group rules may affect cluster running. Exercise caution when performing this operation. If you need to modify security group rules, do not modify the rules of the port on which CCE running depends.
  • When adding a new security group rule to a cluster, ensure that the new rule does not conflict with the original rules. Otherwise, the original rules may become invalid, affecting the cluster running.

Security Group Rules of a Cluster Using a VPC Network

Security group of worker nodes

A security group named {Cluster name}-cce-node-{Random ID} is automatically created for worker nodes in a cluster. For details about the default ports, see Table 1.

Table 1 Default ports in the security group for worker nodes that use a VPC network

Direction

Port

Default Source Address

Description

Modifiable

Modification Suggestion

Inbound rules

All UDP ports

VPC CIDR block

Allow access between worker nodes and between the worker nodes and master nodes.

No

N/A

All TCP ports

All ICMP ports

Security group of the master node

Used for the master node to access worker nodes.

No

N/A

TCP port range: 30000 to 32767

All IP addresses: 0.0.0.0/0

Allow access from NodePort.

Yes

These ports must permit requests from VPC, container, and ELB CIDR blocks.

UDP port range: 30000 to 32767

All

Container CIDR block

Used for mutual access between nodes and containers.

No

N/A

All

Security group of worker nodes

Used for mutual access between worker nodes.

No

N/A

TCP port 22

All IP addresses: 0.0.0.0/0

Port that allows remote access to Linux ECSs using SSH.

Recommended

N/A

Outbound rule

All

All IP addresses: 0.0.0.0/0

Allow traffic on all ports by default. You are advised to retain this setting.

Yes

If you want to harden security by allowing traffic only on specific ports, remember to allow such ports. For details, see Hardening Outbound Rules.

Security group of the master node

A security group named {Cluster name}-cce-control-{Random ID} is automatically created for the master node. For details about the default ports, see Table 2.

Table 2 Default ports in the security group for the master node that uses a VPC network

Direction

Port

Default Source Address

Description

Modifiable

Modification Suggestion

Inbound rules

TCP port 5444

VPC CIDR block

Allow access from kube-apiserver, which provides lifecycle management for Kubernetes resources.

No

N/A

TCP port 5444

Container CIDR block

TCP port 9443

VPC CIDR block

Allow the network add-on of the worker nodes to access master nodes.

No

N/A

TCP port 5443

All IP addresses: 0.0.0.0/0

Allow kube-apiserver of the master node to listen to the worker nodes.

Recommended

The port must allow traffic from the CIDR blocks of the VPC, container, and the control plane of the hosted service mesh.

TCP port 8445

VPC CIDR block

Allow the storage add-on of the worker nodes to access master nodes.

No

N/A

All

IP addresses of this security group

Allow traffic from all IP addresses of this security group.

No

N/A

Outbound rule

All

All IP addresses: 0.0.0.0/0

Allow traffic on all ports by default.

No

N/A

Security Group Rules of a Cluster Using the Tunnel Network

Security group of worker nodes

A security group named {Cluster name}-cce-node-{Random ID} is automatically created for worker nodes in a cluster. For details about the default ports, see Table 3.

Table 3 Default ports in the security group for worker nodes that use a tunnel network

Direction

Port

Default Source Address

Description

Modifiable

Modification Suggestion

Inbound rules

UDP port 4789

All IP addresses: 0.0.0.0/0

Allow access between containers.

No

N/A

TCP port 10250

CIDR block of the master node

Allow master nodes to access kubelet on worker nodes, for example, by running kubectl exec {pod}.

No

N/A

TCP port range: 30000 to 32767

All IP addresses: 0.0.0.0/0

Allow access from NodePort.

Yes

These ports must permit requests from VPC, container, and ELB CIDR blocks.

UDP port range: 30000 to 32767

TCP port 22

All IP addresses: 0.0.0.0/0

Port that allows remote access to Linux ECSs using SSH.

Recommended

N/A

All

IP addresses of this security group

Allow traffic from all IP addresses of this security group.

No

N/A

Outbound rule

All

All IP addresses: 0.0.0.0/0

Allow traffic on all ports by default. You are advised to retain this setting.

Yes

If you want to harden security by allowing traffic only on specific ports, remember to allow such ports. For details, see Hardening Outbound Rules.

Security group of the master node

A security group named {Cluster name}-cce-control-{Random ID} is automatically created for the master node. For details about the default ports, see Table 4.

Table 4 Default ports in the security group for the master node that uses a tunnel network

Direction

Port

Default Source Address

Description

Modifiable

Modification Suggestion

Inbound rules

UDP port 4789

All IP addresses: 0.0.0.0/0

Allow access between containers.

No

N/A

TCP port 5444

VPC CIDR block

Allow access from kube-apiserver, which provides lifecycle management for Kubernetes resources.

No

N/A

TCP port 5444

Container CIDR block

TCP port 9443

VPC CIDR block

Allow the network add-on of the worker nodes to access master nodes.

No

N/A

TCP port 5443

All IP addresses: 0.0.0.0/0

Allow kube-apiserver of the master node to listen to the worker nodes.

Recommended

The port must allow traffic from the CIDR blocks of the VPC, container, and the control plane of the hosted service mesh.

TCP port 8445

VPC CIDR block

Allow the storage add-on of the worker nodes to access master nodes.

No

N/A

All

IP addresses of this security group

Allow traffic from all IP addresses of this security group.

No

N/A

Outbound rule

All

All IP addresses: 0.0.0.0/0

Allow traffic on all ports by default.

No

N/A

Hardening Outbound Rules

By default, all security groups created by CCE allow all the outbound traffic. You are advised to retain this configuration. To harden outbound rules, ensure that the ports listed in the following table are enabled.

Table 5 Minimum configurations of outbound security group rules for worker nodes

Port

Allowed CIDR

Description

UDP port 53

DNS server of the subnet

Allow traffic on the port for domain name resolution.

UDP port 4789 (required only for clusters that use the tunnel networks)

All IP addresses

Allow access between containers.

TCP port 5443

CIDR block of the master node

Allow kube-apiserver of the master node to listen to the worker nodes.

TCP port 5444

CIDR blocks of the VPC and container

Allow access from kube-apiserver, which provides lifecycle management for Kubernetes resources.

TCP port 6443

CIDR block of the master node

None

TCP port 8445

VPC CIDR block

Allow the storage add-on of the worker nodes to access master nodes.

TCP port 9443

VPC CIDR block

Allow the network add-on of the worker nodes to access master nodes.

All ports

198.19.128.0/17

Allow worker nodes to access the VPC Endpoint (VPCEP) service.

UDP port 123

Public service CIDR block, which can be obtained from the administrator

Allow worker nodes to access the internal NTP server.

TCP port 443

Public service CIDR block, which can be obtained from the administrator

Allow worker nodes to access OBS over internal networks to pull the installation package.

TCP port 6443

Public service CIDR block, which can be obtained from the administrator

Allow worker nodes to report that the worker nodes are installed.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback