Getting a cluster going for a blog & the meander sequencer.
Special config for the cluster is necessary if we want ingress to work.
kind create cluster --config=./kubernetes/kind/cluster.yaml
(Directions taken from here, in case they stop working.)
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml && \
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s
Using kubernetes-secret-generator
for... generating secrets:
helm repo add mittwald https://helm.mittwald.de
helm upgrade --install kubernetes-secret-generator mittwald/kubernetes-secret-generator
TODO: how do I incorporate this such that it doesn't need to be a manual step before apply
?
cd terraform/production
terraform init # if it's your first time
terraform apply
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml
# export a base64 encoded token as env var DO_TOKEN
export DO_TOKEN=$(echo -n "<token_string>" | base64)
curl --silent https://raw.githubusercontent.com/digitalocean/do-operator/v0.1.5/releases/do-operator-v0.1.5.yaml | \
yq e '(.data | select(. | has("access-token"))).access-token|=strenv(DO_TOKEN)' | \
kubectl apply -f -
kubectl apply -k ./kubernetes/local
kubectl get pods -n ghost -l <label_key>=<label_value> -o jsonpath'{.items..metadata.name}'
kubectl get secret -n ghost <secret_name> -o jsonpath='{.data.<key>}' | base64 -D
kubectl run -it --namespace ghost --rm \
--image=$(kubectl get deployments -n ghost --field-selector metadata.name=ghost-mysql -o jsonpath='{.items..spec.template.spec.containers..image}') \
--restart=Never \
mysql-client -- \
mysql -h ghost-mysql -p$(kubectl get secret -n ghost mysql-root-password -o jsonpath='{.data.password}' | base64 -D)
kubectl run my-shell --rm -i --tty --image ubuntu -- bash