Skip to content

friendziz/kubernetes-cicd-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes CICD Tutorial

This repo contains all the code needed to follow along with our YouTube Tutorial or Written Article.

Prerequisites

To follow along with this tutorial, you'll need:

Install ArgoCD

helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
kubectl create namespace argocd
helm install argocd argo/argo-cd --namespace argocd

Access ArgoCD UI

kubectl port-forward svc/argocd-server -n argocd 8080:80

Retrieve Credentials

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

ArgoCD Application

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: grade-submission-api
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/YOUR_USERNAME/grade-api-gitops.git
    targetRevision: HEAD
    path: .
  destination:
    server: https://kubernetes.default.svc
    namespace: default
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

Creating Image Pull Secrets

To allow Kubernetes to pull images from GitHub Container Registry:

kubectl create secret docker-registry ghcr-secret \\
  --docker-server=ghcr.io \\
  --docker-username=YOUR_USERNAME \\
  --docker-password=YOUR_PAT \\
  --namespace=default

Kubernetes Training

If you found this guide helpful, check out our Kubernetes Training course

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.6%
  • Dockerfile 15.4%