# cluster-api-provider-k3k **Repository Path**: mirrors_rancher/cluster-api-provider-k3k ## Basic Information - **Project Name**: cluster-api-provider-k3k - **Description**: Test k3k provider for CAPI - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-26 - **Last Updated**: 2025-10-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # capi-k3k A Cluster API provider for [K3k](https://github.com/rancher/k3k). ## Description This project allows the provisioning and management of K3k clusters using [CAPI](https://cluster-api.sigs.k8s.io). ## Getting Started ### Prerequisites The following specify the minimum version requirement of each component: - Go v1.22 - Docker v24 - Access to a Kubernetes cluster v1.25 - Tilt v0.33.11 - Helm v3.12.0 ### Run from development branch Follow the [upstream docs](https://cluster-api.sigs.k8s.io/developer/tilt) to run the project locally. The basic steps: #### Install [Tilt](https://tilt.dev) #### Deploy a Kubernetes cluster Any cluster should work. For quick local tests, Kind and K3d are recommended. #### Create a local Docker container registry This is necessary to avoid pushing to a remote repo frequently. For K3d: ```bash k3d registry create --port 51111 # Or use a different port. ``` #### Create a cluster using the registry ```bash k3d cluster create --registry-use $CONTAINER_NAME:$PORT ``` #### Clone the upstream [CAPI](https://github.com/kubernetes-sigs/cluster-api) project In your local copy of the project, paste the following into `tilt-settings.yaml`: ```yaml provider_repos: - ../cluster-api-provider-k3k enable_providers: - k3k allowed_contexts: - k3d-k3s-default kustomize_substitutions: CLUSTER_TOPOLOGY: "true" ``` The last two lines are only necessary if testing using cluster classes. Some notes: - The above assumes that the upstream CAPI project is in the same folder as the cluster-api-provider-k3k project. If that isn't true, adjust the path in `provider_repos`. - `allowed_contexts` controls which kubeconfig contexts Tilt is able to use to deploy resources. This needs to point to a context for an admin account on the cluster. You may need to change this value depending on your current kubeconfig contents. #### In the local copy of the CAPI upstream project, run Tilt ```bash export IMG="$CONTAINER_NAME:$PORT/controller:latest" tilt up ``` Most code changes will cause Tilt to automatically rebuild the Go binary, rebuild the Docker image and push it to the local registry. However, if you are changing values related to RBAC configuration or CRD fields, you may need to do the following: - Stop Tilt - In this project's repo, regenerate the CRDs and manifests (`make generate && make manifests`) - Start Tilt again ## Project Distribution TODO: This project is in an unreleased, alpha state. As of now, there are no releases, or a supported way to install the project other than the dev setup documented above. ## Contributing All changes should have an issue attached to them, and should have tests (where appropriate). ## License Copyright 2024. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.