Coder Social home page Coder Social logo

terraform-azurerm-aks-fluxcd's Introduction

tf-aks-fluxcd

Tired of boostrapping Flux by hand?
No CI/CD process to have that all setup?
Not feeling like you want to run all those commands to perform your installation?

There is a solution:

  • Terraform code to bootstrap Flux on AKS from your repository. This will use your ~/.kube/config file and the current context to know where to perform the installation. And boostrap your GitOps repository to the desired location

Pre-requisites

  • Azure Kubernetes cluster already created
  • Your kubectl context to be set to the cluster that you want to deploy.

Setup

# Add your configuration to config.auto.tfvars, this will be automatically picked up by Terraform

branch          = "dev"                             # Branch for bootstraping
github_owner    = "julanu"                          # Repository owner
target_path     = "clusters/my-cluster"             # Relative path to your Flux files
repository_name = "gitops-kustomize-infrastructure" # Repository name

Install

$ terraform init && terraform validate
$ terraform plan
$ terraform apply -var "github_token=<YOUR_TOKEN" -auto-approve

View components

$ flux get all --all-namespaces   # View all flux components with crds

NAMESPACE  	NAME                     	REVISION   	SUSPENDED	READY	MESSAGE                                                                     
flux-system	gitrepository/flux-system	dev/1500ad2	False    	True 	stored artifact for revision 'dev/1500ad263a88782f677ace0aba87b405142ce989'	
[...]

$ kubectl get deployments -A      # View controler deployments

NAMESPACE     NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
flux-system   helm-controller           1/1     1            1           17s
flux-system   kustomize-controller      1/1     1            1           15s
flux-system   notification-controller   1/1     1            1           17s
flux-system   source-controller         1/1     1            1           17s
[...]

terraform-azurerm-aks-fluxcd's People

Contributors

julanu avatar

Watchers

 avatar

Forkers

bhanukiran-jc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.