runme | ||||
---|---|---|---|---|
|
kind create cluster --name kraken-demo
kubectl apply --filename https://github.com/cert-manager/cert-manager/releases/download/v1.14.4/cert-manager.yaml
kubectl wait --for=condition=Available \
--namespace cert-manager \
deployment/cert-manager \
deployment/cert-manager-cainjector \
deployment/cert-manager-webhook
kubectl create namespace argocd
kubectl apply --namespace argocd --filename https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl wait --for=condition=Available --namespace argocd deployment/argocd-server --timeout=1m
kubectl port-forward --namespace argocd svc/argocd-server 8443:80
kubectl apply --kustomize "https://github.com/kraken-iac/kraken//config/default/?version=v0.5.1"
kubectl wait --for=condition=Available --namespace kraken-system deployments/kraken-controller-manager
kubectl create namespace aws-ec2-instance-system
kubectl apply --kustomize aws-credentials
kubectl apply --kustomize "https://github.com/kraken-iac/aws-ec2-instance//config/default/?version=v0.1.1"
kubectl wait --for=condition=Available --namespace aws-ec2-instance-system deployments/aws-ec2-instance-controller-manager
cat demo-config/configexport-a.yaml
cat demo-config/configexport-b.yaml
kubectl apply --filename demo-config/configexport-a.yaml
kubectl apply --filename demo-config/configexport-b.yaml
kubectl get configexport configexport-a --output yaml
kubectl get configexport configexport-b --output yaml
cat demo-config/ec2instance-a.yaml
cat demo-config/ec2instance-b.yaml
kubectl apply --filename demo-config/ec2instance-a.yaml
kubectl apply --filename demo-config/ec2instance-b.yaml
kubectl get ec2instance ec2instance-a --output yaml
kubectl get ec2instance ec2instance-b --output yaml
kubectl get ec2instance ec2instance-a --output jsonpath='{.status}' --watch | yq --input-format json
kubectl get configexport configexport-a --output jsonpath='{.status}' --watch | yq --input-format json
kubectl get ec2instance ec2instance-b --output jsonpath='{.status}' --watch | yq --input-format json
kubectl get configexport configexport-b --output jsonpath='{.status}' --watch | yq --input-format json
kubectl apply --filename demo-config/configmap-a.yaml
kubectl patch configmap configmap-a --patch '{"data":{"maxCount":"2"}}'
kubectl delete --filename demo-config
argocd_password=$(kubectl get secret --namespace argocd argocd-initial-admin-secret --template={{.data.password}} | base64 -d)
argocd login 127.0.0.1:8443 \
--username admin \
--password ${argocd_password} \
--insecure
echo "ArgoCD Password: $argocd_password"
kubectl config set-context --current --namespace argocd
argocd app create my-infra \
--repo https://github.com/kraken-iac/demo.git \
--path demo-config \
--dest-server https://kubernetes.default.svc \
--dest-namespace default \
--server 127.0.0.1:8443 \
--insecure
kind delete cluster --name kraken-demo