Skip to content

Instantly share code, notes, and snippets.

@yebyen
Last active June 13, 2023 13:23
Show Gist options
  • Save yebyen/3a84b3e33d84ceb92a1dfcf5fdba7db6 to your computer and use it in GitHub Desktop.
Save yebyen/3a84b3e33d84ceb92a1dfcf5fdba7db6 to your computer and use it in GitHub Desktop.
ArgoCD with Ingress, ingress-nginx, on KiND
#!/bin/bash
# from https://argoproj.github.io/argo-cd/getting_started/
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
cat <<EOF | kubectl apply -f -
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: argocd-server-ingress
namespace: argocd
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
spec:
rules:
- host: localhost
http:
paths:
- backend:
serviceName: argocd-server
servicePort: https
EOF
#!/bin/bash
kubectl cluster-info --context kind-kind
# kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm upgrade --install my-release ingress-nginx/ingress-nginx --set "controller.hostNetwork=true,\
controller.daemonset.useHostPort=true,controller.kind=DaemonSet,controller.service.type=NodePort,\
controller.extraArgs.enable-ssl-passthrough="
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
extraPortMappings:
- containerPort: 80
hostPort: 80
- containerPort: 443
hostPort: 443
- role: worker
- role: worker
#!/bin/bash
kind create cluster --config=cluster.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment