Giter Club home page Giter Club logo

k8s-argocd-datadog's Introduction

argoCDの環境構築

kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

clusterの認証情報を確認

gcloud container clusters get-credentials [CLUSTER_NAME] --zone asia-northeast1 --project [PROJECT_ID]

externalIPでホスティング

# ArgoCDのnamespaceに切り替え
kubectl config set-context --current --namespace=argocd
# ArgoCD ServerのServiceをLoadBalancerに変更
kubectl patch svc argocd-server -p '{"spec": {"type": "LoadBalancer"}}'
# 外部IPの確認
kubectl get svc argocd-server
# ブラウザで開く
open http://$(kubectl get svc argocd-server -n argocd -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
# 初期パスワード取得 初期usernameはadmin
kubectl -n argocd get secret/argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo

argo Workflowの環境構築

# install
kubectl create namespace argo
kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v3.4.11/install.yaml
# argo-serverのServiceをLoadBalancerに変更
kubectl patch svc argo-server -n argo -p '{"spec": {"type": "LoadBalancer"}}'
# 外部IPの確認
kubectl get svc argo-server -n argo
# 認証を変更
kubectl patch deployment \
  argo-server \
  --namespace argo \
  --type='json' \
  -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": [
  "server",
  "--auth-mode=server"
]}]'
# ブラウザで開く
export URL=https://$(kubectl get svc argo-server -n argo -o jsonpath='{.status.loadBalancer.ingress[0].ip}'):2746
open $URL

argo Workflowの実行権限追加

# create serviceaccount
kubectl create serviceaccount argocd -n argocd
# apply role
kubectl apply -f role.yaml -n argocd
kubectl apply -f rolebinding.yaml -n argocd

create serviceaccount token

gcloud iam service-accounts create argocd --display-name "argocd"
gcloud projects add-iam-policy-binding planet-4f7c6 --member=serviceAccount:[email protected] --role=roles/storage.admin
gcloud iam service-accounts keys create key.json --iam-account [email protected]
kubectl create secret generic token --from-file=key.json=key.json

k8s-argocd-datadog's People

Contributors

ai1411 avatar akrish1411 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.