Git Product home page Git Product logo

week7_tf_flux's Introduction

Task: Create K8S cluster, deploy flux and make CD in GitOps way for application "kbot"

Modules that will be used:

https://github.com/den-vasyliev/tf-google-gke-cluster

github.com/den-vasyliev/tf-fluxcd-flux-bootstrap

github.com/den-vasyliev/tf-github-repository

github.com/den-vasyliev/tf-hashicorp-tls-keys

Prerequisites

install terraform and flux

1. Instalation

Copy repo and run terraform

git clone https://github.com/spolish/week7_tf_flux

terraform init

terraform apply

Note: Terraform will reqier credentials from GitHub and name of project in Google Cloud

2. Created Resources

	2.1 K8S cluster

K8S cluster 2.2 Repo in Github Repo 2.3 Flux in K8s cluster Flux

3. In repo flux-gitops/cluster create folder for app deployment

3.1 ns.yaml

apiVersion: v1
kind: Namespace
metadata:
  name: demo

3.2 kbot-gr.yaml

apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: kbot
  namespace: demo
spec:
  url: http://github.com/spolish/kbot
  interval: 1m0s
  ref:
    branch: docker-flux

3.3 kbot-hr.yaml

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: kbot
  namespace: demo
spec:
  chart:
    spec:
      chart: ./helm
      reconcileStrategy: Revision
      sourceRef:
        kind: GitRepository
        name: kbot
  interval: 1m0s

Option: reconcileStrategy: Revision means that flux will re-deploy an application after each commit in kbot repo

Result

commit-3abad5d

commit-c07f983

Telegram example

week7_tf_flux's People

Contributors

spolish avatar

Watchers

 avatar

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.