Giter Club home page Giter Club logo

argocd-apps's Introduction

Argo CD

Manage Kubernetes with Argo CD

With argocd CLI

Create an App of Apps with the commands:

argocd app create apps \
--dest-namespace default \
--dest-server https://kubernetes.default.svc \
--repo https://github.com/st3w4r/argocd-apps.git \
--path apps

argocd app sync apps

Deploy the application with kubectl:

# Create the app of Apps
kubectl apply -f applications.yaml

# Delete the app of Apps
kubectl delete -f applications.yaml

Create cluster

$ cat prod_config.yaml

apiVersion: kind.x-k8s.io/v1alpha4
networking:
        apiServerAddress: 192.168.0.1
        apiServerPort: 8444


$ kind create cluster --name prod --config prod_config.yaml

$ argocd cluster add kind-prod

Get access to the UI

  • Port forward argo server
  • Get password kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
  • Go to localhost:8080
  • Username admin

Login if token as expired

sh ../password.sh

argocd login localhost:8080

> admin
> <password>

argocd cluster list

Objective

  • Multi cluster
  • Folder with base application
  • Deploy base app with custom configuration for each clsuter
  • Manage ArgoCD by itself
  • Automated test before env promotion

ArgoCD manage itself

Based on: https://github.com/kurtburak/argocd

$ kind create cluster --name argo

Creating cluster "argo" ...
 โœ“ Ensuring node image (kindest/node:v1.21.1) ๐Ÿ–ผ
 โœ“ Preparing nodes ๐Ÿ“ฆ
 โœ“ Writing configuration ๐Ÿ“œ
 โœ“ Starting control-plane ๐Ÿ•น๏ธ
 โœ“ Installing CNI ๐Ÿ”Œ
 โœ“ Installing StorageClass ๐Ÿ’พ
Set kubectl context to "kind-argo"
You can now use your cluster with:

kubectl cluster-info --context kind-argo

Not sure what to do next? ๐Ÿ˜…  Check out https://kind.sigs.k8s.io/docs/user/quick-start/

Change cotnext

$ kubectl config use-context kind-argo

Switched to context "kind-argo".

$ kubectl cluster-info - contact kind-argo

Kubernetes control plane is running at https://127.0.0.1:45119
CoreDNS is running at https://127.0.0.1:45119/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

Install helm chart

cd argo-cd

helm repo add dandydev https://dandydeveloper.github.io/charts

helm dependency build

cd ..

helm install argocd ./argo-cd --namespace argocd --create-namespace -f values-override.yaml
kubectl port-forward service/argocd-server -n argocd 8080:443

Open http://localhost:8080

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.