How to run kubernetes cluster “local-test” locally

This guide provides step-by-step instructions to run the kubernetes cluster named “local-test” locally. It covers the process of updating FluxCD code, committing changes, and deploying the cluster.

Steps

Step 1: Navigate to the local-test cluster directory

First, go to the directory od local-test cluster.

cd deploy/clusters/local-test
ls

Step 2: Run the task command

Execute the task command to prepare the environment.

task

Step 3: Deploy the cluster

Run the following command to deploy the cluster.

task

Step 4: Update FluxCD code

To update FluxCD code, commit and push changes to your remote Git branch. Use the `–force-with-lease option for safe updates.

git add .
git commit -m "feat: update FluxCD configuration"
git push
# Or
git commit --amend --no-edit
git push --force-with-lease

Step 5: Wipe and re-deploy the cluster (if needed)

If you need to wipe and re-deploy the cluster, run the following command:

task deploy -f
task deploy -f

Now you run the kubernetes cluster “local-test” locally and updated the FluxCD code.