Skip to content

Continuos delivery demo (Kubernetes + ArgoCD + Crossplane)

Notifications You must be signed in to change notification settings

Kris1980k/CD-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

435 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

Update your system

sudo dnf update -y

Install Docker

sudo dnf install docker -y
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker $USER && newgrp docker 

Install K3s (lightweight kubernetes with kubectl integrated)

curl -sfL https://get.k3s.io | sh - 
sudo k3s kubectl get node 
alias kubectl='sudo k3s kubectl'
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
sudo chmod +r /etc/rancher/k3s/k3s.yaml

Install ArgoCD

Create namespace

kubectl create namespace argocd

Install ArgoCD

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

Install ArgoCD CLI

curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64 

Create a nodeport via YAML to connect to the service

apiVersion: v1
kind: Service
metadata:
  name: argocd-server-nodeport
  namespace: argocd
spec:
  type: NodePort
  ports:
    - port: 80
      targetPort: 8080
      nodePort: 30007 # Specify the nodePort you want to use, or let Kubernetes allocate one for you.
  selector:
    app.kubernetes.io/name: argocd-server
kubectl apply -f argocd-server-nodeport.yaml
  kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
kubectl get svc -n argocd

Install Helm

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Install Crossplane

helm repo add crossplane-stable https://charts.crossplane.io/stable

helm repo update

helm install crossplane \
  --namespace crossplane-system \
  --create-namespace \
  crossplane-stable/crossplane \
  --kubeconfig $KUBECONFIG

Create secret

kubectl create secret generic aws-secret \
  --namespace=demo \
  --from-file=creds=./aws-credentials.ini

About

Continuos delivery demo (Kubernetes + ArgoCD + Crossplane)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors