📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Kubernetes Kubernetes CI/CD

Kubernetes CI/CD

5 min read
Deploy to K8s from GitHub Actions and use ArgoCD for GitOps continuous delivery.

Kubernetes CI/CD Patterns

# GitHub Actions deploy to K8s
- name: Deploy to Kubernetes
  run: |
    echo "${{ secrets.KUBECONFIG }}" | base64 -d > kubeconfig
    export KUBECONFIG=kubeconfig
    kubectl set image deployment/myapp myapp=myrepo/myapp:${{ github.sha }}
    kubectl rollout status deployment/myapp

# ArgoCD GitOps — auto-sync K8s state with Git
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml -n argocd

# ArgoCD Application
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp
spec:
  source:
    repoURL: https://github.com/org/repo
    targetRevision: main
    path: k8s/
  destination:
    server: https://kubernetes.default.svc
    namespace: production
  syncPolicy:
    automated:
      prune: true
      selfHeal: true