clusterapi

command
v1.30.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

README

This is experimental integration with the cluster-api. It is very much not production ready (and currently barely works).

We plug in our own bootstrap provider with the goal of enabling cluster-api nodes to join a kOps cluster.

Create a cluster on GCP

Note: the name & zone matter, we need to match the values we'll create later in the CAPI resources.

kops create cluster clusterapi.k8s.local --zones us-east4-a
kops update cluster clusterapi.k8s.local --yes --admin
kops validate cluster --wait=10m

#cd cluster-api-provider-gcp #REGISTRY=${USER} make docker-build docker-push #REGISTRY=${USER} make install-management-cluster # Doesn't yet exist in capg

TODO: Install cert-manager

Install CAPI and CAPG

cd clusterapi
kubectl apply ---server-side -f manifests/build

Install our CRDs

kustomize build config | kubectl apply --server-side -f -

Remove any stuff left over from previous runs

kubectl delete machinedeployment --all
kubectl delete gcpmachinetemplate --all
# Very carefully create a MachineDeployment matching our configuration
cat examples/manifest.yaml | IMAGE_ID=projects/ubuntu-os-cloud/global/images/family/ubuntu-2204-lts GCP_NODE_MACHINE_TYPE=e2-medium KUBERNETES_VERSION=v1.28.6 WORKER_MACHINE_COUNT=1  GCP_ZONE=us-east4-a GCP_REGION=us-east4 GCP_NETWORK_NAME=clusterapi-k8s-local GCP_SUBNET=us-east4-clusterapi-k8s-local GCP_PROJECT=$(gcloud config get project) CLUSTER_NAME=clusterapi-k8s-local envsubst | kubectl apply --server-side -n kube-system -f -

IMAGE_ID=projects/debian-cloud/global/images/family/debian-12 doesn't work with user-data (????)

Run our controller, which populates the secret with the bootstrap script

go run .

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
bootstrap
kops/api/v1beta1
Package v1beta1 contains API Schema definitions for the kops v1beta1 API group +kubebuilder:object:generate=true +groupName=bootstrap.cluster.x-k8s.io
Package v1beta1 contains API Schema definitions for the kops v1beta1 API group +kubebuilder:object:generate=true +groupName=bootstrap.cluster.x-k8s.io
controlplane
kops/api/v1beta1
Package v1beta1 contains API Schema definitions for the kops v1beta1 API group +kubebuilder:object:generate=true +groupName=controlplane.cluster.x-k8s.io
Package v1beta1 contains API Schema definitions for the kops v1beta1 API group +kubebuilder:object:generate=true +groupName=controlplane.cluster.x-k8s.io
snapshot
cluster-api/api/v1beta1
Package v1beta1 contains API Schema definitions for the cluster v1beta1 API group +kubebuilder:object:generate=true +groupName=cluster.x-k8s.io
Package v1beta1 contains API Schema definitions for the cluster v1beta1 API group +kubebuilder:object:generate=true +groupName=cluster.x-k8s.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL