Skip to content

kraken-iac/demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

runme
id version
01HTW17VMH3NSECHM79QNF6JJ6
v3

Kraken Demo

Architecture Overview

What We'll Build

Demo Config

Create Cluster

kind create cluster --name kraken-demo

Install cert-manager

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

Install ArgoCD

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

Install Core Kraken Components

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

Install EC2Instance Components

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

Create ConfigExports

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

Create EC2Instances

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

Current Progress

Watch Statuses of All Dependent Resources

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

Create configmap-a

kubectl apply --filename demo-config/configmap-a.yaml

Update configmap-a

kubectl patch configmap configmap-a --patch '{"data":{"maxCount":"2"}}'

Delete All Resources

kubectl delete --filename demo-config

GitOps with ArgoCD

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

Cleanup

kind delete cluster --name kraken-demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published