/eks-fluxcd-bootstrap

Sample repository for GitOps-based bootstrap of Amazon EKS clusters using FluxCD and eksctl.

MIT No AttributionMIT-0

eks-fluxcd-bootstrap

This repository contains non-production FluxCD manifests used to bootstrap of Amazon EKS clusters with eksctl using the GitOps approach.

Prerequisites (CLI)

The following Command Line Interfaces (CLIs) are required to use the assets from this repository:

  • eksctl, >= 0.68.0
  • awscli, >= 2.2.43
  • flux, >= 0.17.2

Setup

  1. Fork this repository using your own GitHub account.

  2. Create an GitHub Personal Access Token to authenticate against the GitHub APIs, and export it to environment variables:

export GITHUB_TOKEN=<YOUR GH TOKEN>
export GITHUB_USER=<YOUR GH USERNAME>
  1. Checkout your forked repository, create a demo branch and push to the origin:
git clone https://github.com/<YOUR GH USERNAME>/eks-fluxcd-bootstrap
cd eks-fluxcd-bootstrap/
git checkout -b demo
git push -u origin demo
  1. Modify the owner on eksctl-config.yaml file to use your GitHub username:
gitops:
  flux:
    gitProvider: github
    flags:
      owner: <YOUR GH USERNAME>
      repository: eks-fluxcd-bootstrap
      branch: demo
      path: ./clusters/sandbox/
      namespace: flux-system
  1. Commit the changes into the demo branch, and push it to the origin:
git commit -am 'Change GitOps repository information'
git push -u origin demo
  1. Create the Amazon EKS cluster with eksctl, using the configuration file:
eksctl create cluster -f helpers/eksctl-config.yaml

Cleanup

  1. Delete your Amazon EKS cluster:
eksctl delete cluster --name sandbox
  1. Delete the remote and local demo branch of your forked repository:
git checkout main
git push --delete origin demo
git branch -D demo

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.