GithubHelp home page GithubHelp logo

my-app-deployment's Introduction

Hands-On

1. Install Kustomize

brew install kustomize
kustomize version

2. Fork The Example Repo

3. Clone Your Fork

In your terminal:

export username=... ;# your Github username in lowercase
git clone [email protected]:${username}/my-app-deployment.git
cd my-app-deployment

4. Build The Base

kustomize build base

Note: The above URL should start with "git@" and you'll need to enter your username.

5. Create An Overlay

mkdir -p overlays/dev
cat > overlays/dev/kustomization.yaml <<EOL
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - ../../base
EOL
kustomize build overlays/dev
git add . && git commit -am "add dev overlay"
git push

6. Change The Name Prefix

cd overlays/dev
kustomize edit set nameprefix ${username}-
git diff
kustomize build
git commit -am "set name prefix"
git push

7. Open Argo CD And Create Your App

Field Value
Application name: ${username}
Project: default
Sync policy: Manual
Repository: https://github.com/${username}/my-app-deployment
Revision: HEAD
Path: overlays/dev
Cluster: https://kubernetes.default.svc
Namespace: default

8. Sync Your App

  • Click "Sync".
  • Click "Synchronize" in the Sliding panel.

9. Upgrade Your App

kustomize edit set image gitopsworkshop/my-app:v2
git diff
kustomize build
git commit -am "upgrade to version 2"
git push
  • Detect git changes: "Refresh"
  • Preview Differences: "App Diff"
  • Deploy New Version: "Sync"

10. Troubleshoot Degraded App

  1. Open app
  2. Find the red heart
  3. Clik on the resource and check each tab

11. Emergency Rollback

  • Click "History And Rollback"
  • Click "..." button in the last row
  • Click "Rollback"
  • Click "Ok" in the modal panel

12. GitOps Rollback

git revert $(git rev-parse HEAD)
git push

my-app-deployment's People

Contributors

alexec avatar anwarchk avatar alexmt 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.