Skip to content

yahav876/gitops-terraform-k8s-helm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage

About The Project

The product owners are all about the new buzz word: GitOps! For this project, I will create a new Kubernetes cluster on AWS, deploy a monitoring tool using Helm chart and go everything the GitOps way.

The end goal, provide a demonstration on how you are committing a code in your source control and the changes will be deployed to the infrastructure without manual intervention.

(back to top)

Built With

This section should list any major frameworks/libraries used to bootstrap my project.

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • terraform
    brew tap hashicorp/tap
    brew install hashicorp/tap/terraform
  • helm
    curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
    chmod 700 get_helm.sh
    ./get_helm.sh

Installation

  1. Fork the repo

  2. Configure "Secrets"

     AWS_ACCESS_KEY_ID
     AWS_SECRET_ACCESS_KEY
     KUBE_CONFIG_DATA (cat $HOME/.kube/config | base64)
  3. Open terraform cloud account, create TF_API_TOKEN- https://app.terraform.io/app/settings/tokens

    Create environment variables of aws:

    AWS_ACCESS_KEY_ID

    AWS_SECRET_ACCESS_KEY

    Add Secret "TF_API_TOKEN" in your github repo settings.

  4. Make a commit and push it , A github actions pipeline should now apply your Infrastructure

  5. Configure kubectl with aws:

    aws eks update-kubeconfig --region region-code --name cluster-name
  6. After helm deployment test UI of Grafana/Prometheus/ Alertmanager

    kubectl port-forward deployment/monitoring-grafana 3000
    kubectl port-forward svc/prometheus-k8s 9090
    kubectl port-forward svc/alertmanager-main 9093
    
    user: admin
    password: prom-operator

(back to top)

Usage

Every change you wish to make should be in eks/env/variables.tfvars file just change the values as you want.

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published