A Cluster API provider for K3k.
This project allows the provisioning and management of K3k clusters using CAPI.
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
Follow the upstream docs to run the project locally. The basic steps:
Install Tilt
Any cluster should work. For quick local tests, Kind and K3d are recommended.
This is necessary to avoid pushing to a remote repo frequently.
For K3d:
k3d registry create --port 51111 # Or use a different port.k3d cluster create --registry-use $CONTAINER_NAME:$PORTClone the upstream CAPI project
In your local copy of the project, paste the following into tilt-settings.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_contextscontrols 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.
export IMG="$CONTAINER_NAME:$PORT/controller:latest"
tilt upMost 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
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.
All changes should have an issue attached to them, and should have tests (where appropriate).
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.