Accessing the configuration repo

You have created an EKS cluster, installed Flux v2 in it, and created a repo that holds manifests matching precisely the current state of your cluster -and you did all that with one command, pretty cool right!.

In order to manage your cluster as well as deploy workloads you will need to clone the repo that Flux v2 created in your GitHub account. Flux created and configured a key pair for the repository automatically, and uses it to provide repository access to the Source Controller running in the cluster.

The following commands will store the private key generated by Flux in your Cloud9 environment as ~/.ssh/id_rsa:

Running these commands in any environment other than Cloud9 will replace any existing default ssh private key that matches the default filename provided.

mkdir -p ~/.ssh
kubectl get secret flux-system -n flux-system --template={{.data.identity}} | base64 -d > ~/.ssh/id_rsa

With this key you will be able to clone the repo created by Flux to manage your cluster using GitOps. Run the following command to clone the repository, replacing <your GitHub username> with your own GitHub username:

git clone git@github.com:<your GitHub username>/aws-workshop-module1.git
cd aws-workshop-module1

You should see the following contents in the local clone of your repository.:

.
└── clusters
    └── aws-workshop
        └── flux-system
            ├── gotk-components.yaml
            ├── gotk-sync.yaml
            └── kustomization.yaml