| Feature | Support Status | Requirements |
|---|---|---|
| LoadBalancer Service | Default Support | No additional deployment required. |
| Ingress | Default Support | Optionally enable Ingress Class functionality (once enabled, you can manually select ingress classes when creating ingress through the form interface). No additional deployment required. |
If you have created a CCE cluster, import the CCE cluster (Public Cloud).
You can create ingress and LoadBalancer services simultaneously or choose one based on your needs.
There are two methods to create ingress. Method 1: Manual Ingress Class Selection is recommended.
Note: Avoid creating two ingress resources with the same path.
(Recommended) Method 1: Manual Ingress Class Selection
In Container Platform, click Network > Ingress in the left navigation.
Click Create Ingress and select CCE Ingress Class for Ingress Class.
Select Protocol. Default is HTTP. For HTTPS, first create a certificate and select it.
Switch to YAML and add the following annotations based on your default Ingress Controller type. For annotation details, see Using Annotations to Configure Load Balancers:
Note: Replace the values in the annotations below with actual environment values.
| Default Ingress Controller Type | Annotations |
|---|---|
| Shared (Auto-create) | kubernetes.io/elb.autocreate: '{"type":"public","bandwidth_name":"{random}","bandwidth_chargemode":"traffic","bandwidth_size":5,"bandwidth_sharetype":"PER","eip_type":"5_bgp"}'kubernetes.io/elb.class: union |
| Shared (Reuse) | kubernetes.io/elb.class: unionkubernetes.io/elb.id: <Load Balancer Instance ID>kubernetes.io/elb.port: '80' |
| Dedicated (Auto-create) | kubernetes.io/elb.autocreate: '{"type":"public","bandwidth_name":"<Bandwidth Name>","bandwidth_chargemode":"traffic","bandwidth_size":5,"bandwidth_sharetype":"PER","eip_type":"5_bgp","available_zone":["<AZ A>","<AZ B>","<AZ C>"],"elb_virsubnet_ids":["<ELB Virtual Subnet ID>"],"l7_flavor_name":"L7_flavor.elb.s1.small","l4_flavor_name":"L4_flavor.elb.s1.small"}'kubernetes.io/elb.class: performancekubernetes.io/elb.port: "80" |
| Dedicated (Reuse) | kubernetes.io/elb.class: performancekubernetes.io/elb.id: <Load Balancer Instance ID>kubernetes.io/elb.port: "80" |
Click Create. Once created, you can access cluster services through ELB.
Method 2: Use Default Ingress Class
Create an IngressClass YAML file with the following content. For details, see Default Ingress Class:
Save the file and apply it to the imported cluster. Replace <filename.yaml> with your actual YAML filename:
In Container Platform, click Network > Ingress in the left navigation.
Select Protocol. Default is HTTP. For HTTPS, first create a certificate and select it.
Click Create. Once created, you can access cluster services through ELB.
In Container Platform, click Network > Services in the left navigation.
Click Create Service and select LoadBalancer for External Access.
Expand annotations and fill in LoadBalancer service annotations as needed.
Click Create.
When using HTTPS protocol, save HTTPS certificate credentials as a Secret (TLS type) in advance.
In Container Platform, click Configuration > Secrets in the left navigation.
Click Create Secret.
Select TLS type and import or fill in Certificate and Private Key as needed.
Click Create.