Install kind:
cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
EOF
Install nginx ingress controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kubectl create namespace argocd
kubectl apply -k bootstrap/argo-cd -n argocd
Skip this step if you use ingress.
kubectl port-forward svc/argocd-server -n argocd 8080:443
Fetch the initial password. The username is admin
:
argocd login localhost:8080 --grpc-web --insecure --username admin --password $(kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d)
First create a personal access token on Github: https://github.com/settings/tokens. Use this token as the password. You can skip the access token part if the repository is publicly accessible.
argocd repo add https://github.com/tom-schoener/argocd-playground.git --username tom-schoener --password <TOKEN>
kubectl apply -k bootstrap/self-manage -n argocd