Skip to content

[Feature Request] Improve UX for k3d cluster in autok3s UI #697

@orangedeng

Description

@orangedeng

Is your feature request related to a problem? Please describe.
When running autok3s with docker-compose/docker, default APIPort 0.0.0.0/0 of k3d won't work.
When running k3d inside container with bridge network and mounting docker.sock into it, k3d can't determine the right ip for k3d cluster. The default APIPort must be configured with other ip/port.

Describe the solution you'd like
The default 0.0.0.0/0 just works for k3d cluster when running docker/docker-compose autok3s.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
The solution is following:

  • If the autok3s finds out that it runs inside container with bridge mode and can determine the gateway ip of the default interface, added the default gw ip to k3d tls-san cluster parameter. This is for the use of autok3s/kube-explorer inside container.
  • Added the request hostname from the cluster create request to k3d tls-san cluster parameter. This is for external use
  • Modify the kubeconfig response with the request hostname.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions