Skip to content

CKS: Fail to create CKS cluster with HA enabled on Shared networks #8585

Open
@weizhouapache

Description

@weizhouapache

when I input the External load balancer IP address, I got the exception

externalloadbalanceripaddress parameter must be specified along with Shared type of network

when I did not input the value, got a different exception

Multi-control nodes, HA Kubernetes cluster with Shared network ID: 82b60ec8-b2a2-4d5c-9dfd-c6528b31b03a needs an external load balancer IP address. externalloadbalanceripaddress parameter can be used

This issue could be fixed by

diff --git a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
index f45f78bf42c..a367a99304e 100644
--- a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
+++ b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
@@ -825,7 +825,7 @@ public class KubernetesClusterManagerImpl extends ManagerBase implements Kuberne
             if (network == null) {
                 throw new InvalidParameterValueException(String.format("%s parameter must be specified along with %s parameter", ApiConstants.EXTERNAL_LOAD_BALANCER_IP_ADDRESS, ApiConstants.NETWORK_ID));
             }
-            if (Network.GuestType.Shared.equals(network.getGuestType())) {
+            if (!Network.GuestType.Shared.equals(network.getGuestType())) {
                 throw new InvalidParameterValueException(String.format("%s parameter must be specified along with %s type of network", ApiConstants.EXTERNAL_LOAD_BALANCER_IP_ADDRESS, Network.GuestType.Shared.toString()));
             }
         }

It works in Advanced zone, but CKS still does not work in advanced zone with security groups.

  • The first control nodes was setup successfully
  • The 2nd/3rd control nodes do not work
ISSUE TYPE
  • Bug Report
COMPONENT NAME

CLOUDSTACK VERSION
ACS 4.19.0-RC4
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Dev In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions