Files
k3k/k3k-kubelet/README.md
T
Hussein GalalandGitHub d19f0f9ca6 virtual-kubelet controller integration (#130)
* Virtual kubelet controller integration

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Add k3k-kubelet image to the release workflow

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Add k3k-kubelet image to the release workflow

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Fix build/release workflow

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Remove pkg directory in k3k-kubelet

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* rename Type to Config

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Move the kubelet and config outside of pkg

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fix comments

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Fix naming throughout the package

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* Fix comments

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* more fixes to naming

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

---------

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2024-10-21 22:54:08 +03:00

1.7 KiB

Virtual Kubelet

This package provides an impelementation of a virtual cluster node using virtual-kubelet.

The implementation is based on several projects, including:

Overview

This project creates a node that registers itself in the virtual cluster. When workloads are scheduled to this node, it simply creates/updates the workload on the host cluster.

Usage

Build/Push the image using (from the root of rancher/k3k):

make build
docker buildx build -f package/Dockerfile . -t $REPO/$IMAGE:$TAG

When running, it is recommended to deploy a k3k cluster with 1 server (with --disable-agent as a server arg) and no agents (so that the workloads can only be scheduled on the virtual node/host cluster).

After the image is built, it should be deployed with the following ENV vars set:

  • CLUSTER_NAME should be the name of the cluster.
  • CLUSTER_NAMESPACE should be the namespace the cluster is running in.
  • HOST_KUBECONFIG should be the path on the local filesystem (in container) to a kubeconfig for the host cluster (likely stored in a secret/mounted as a volume).
  • VIRT_KUBECONFIGshould be the path on the local filesystem (in container) to a kubeconfig for the virtual cluster (likely stored in a secret/mounted as a volume).
  • VIRT_POD_IP should be the IP that the container is accessible from.

This project is still under development and there are many features yet to be implemented, but it can run a basic nginx pod.