kubestellar / kubeflex

A flexible and scalable platform for running Kubernetes control plane APIs.
Apache License 2.0
46 stars 13 forks source link

Puzzled about the Helm chart's `hostContainer` #250

Closed MikeSpreitzer closed 3 months ago

MikeSpreitzer commented 4 months ago

When using the Helm chart to install KubeFlex into an existing cluster that was not created by kind or k3d, to what do I set hostContainer?

BTW, the setting of hostContainer is not even mentioned in https://github.com/kubestellar/kubeflex/blob/610bb5df16a29bcd3676c749379fd728fd241e99/docs/users.md#installing-on-kind or https://github.com/kubestellar/kubeflex/blob/610bb5df16a29bcd3676c749379fd728fd241e99/docs/users.md#installing-on-k3d .

MikeSpreitzer commented 4 months ago

@francostellari

francostellari commented 4 months ago

@MikeSpreitzer (cc @pdettori )

If one create a kind cluster with name foo with the command:

kind create cluster --name foo

Kind will create a new docker container named foo-control-plane for running the desired cluster.

KubeFlex requires the user to tell it the name of that docker container via the hostContainer

--set "hostContainer=foo-control-plane"

The reason why you are not aware of this parameter is because in all examples (including kflex init -c) the kind cluster is named kubeflex, yielding a kubeflex-control-plane docker container, and corresponding to the default value of the hostContainer.

I guess this is an advanced feature that is not discussed because nowhere in the docs the user is told to use a kind cluster with a name different than 'kubeflex'.

pdettori commented 4 months ago

To answer @MikeSpreitzer 's initial question, the value of that parameter only matters if all clusters are on the same docker network and the "join" command for the WECs uses the --force-internal-endpoint-lookup flag. This is the case for kind and k3d in the same host. For other cases (e.g. OCP) that value does not matter.

pdettori commented 3 months ago

@MikeSpreitzer can we close this issue ?

MikeSpreitzer commented 3 months ago

@pdettori answered the question.