Skip to content

Latest commit

 

History

History
 
 

talos

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Talos

How to reproduce the results

NOTE: These steps are a reproduction of our README in the cluster-api-boostrap-provider-talos repo.

cluster-api-bootstrap-provider-talos on GCP

This guide will detail how to deploy the Talos provider into an existing Kubernetes cluster, as well as how to configure it to create Clusters and Machines in GCP.

Import Image

To import the image, you must download a .tar.gz talos release, add it to Google storage, and import it as an image.

Prepare bootstrap cluster

In your cluster that you'll be using to create other clusters, you must prepare a few bits.

Install GCP Provider
  • Git clone the GCP infrastructure provider. Because the GCP provider is being actively developed, it's currently best to build the manifests we need instead of relying on releases.

  • In GCP, create a service account and generate keys for the account. This will result in a JSON file containing the keys. General instructions for generating the key can be found here.

  • In the repo you checked out above, set your environment variables and generate the manifests:

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
export GCP_REGION=us-central1
export GCP_PROJECT=my-gcp-project

make generate-examples
  • Deploy the generated infrastructure components with:
kubectl create -f examples/_out/provider-components.yaml
  • Because this ships with the kubeadm bootstrapper, we'll delete that deployment. It's not needed.
kubectl delete deploy -n cabpk-system cabpk-controller-manager
Install Talos Bootstrap Provider
  • Git clone this repo

  • In the directory, apply the manifests using kustomize:

kustomize build config/default/ | kubectl apply -f -

Create new clusters

There are sample manifests in config/samples/cluster-deployment/gcp for deploying clusters. These will be our starting point.

  • Edit gcp-cluster.yaml, gcp-controlplane.yaml, and gcp-workers.yaml with your relevant data. You will specifically want to edit the GCP image, as well as your GCP project.

  • From config/samples/cluster-deployment/gcp issue kubectl apply -f ..

  • The talos config for your controlplane-0 node can be found with kubectl get talosconfig -o yaml test1-controlplane-0 -o jsonpath='{.status.talosConfig}'.

  • You must target the public IP of the controlplane-0 node (found in GCP console) with osctl config endpoint $EXTERNAL_IP before osctl will work.

Running e2e tests

go get -u -v github.com/heptio/sonobuoy
sonobuoy run --wait --skip-preflight --mode=certified-conformance --plugin e2e --plugin-env e2e.E2E_USE_GO_RUNNER=true
results=$(sonobuoy retrieve)
sonobuoy e2e $results
mkdir ./results; tar xzf ${results} -C ./results