This file provides some commands for you to copy and paste
Values you need to change will be in < > brackets, e.g.:
ssh ubuntu@<MASTER_NODE_IP_ADDRESS> -i <PATH_TO_KEY_FILE>
translates to
ssh ubuntu@1.2.3.4 -i ssh-key-2023-09-01.key
ssh ubuntu@<MASTER_NODE_IP_ADDRESS> -i <PATH_TO_KEY_FILE>## save existing rules
sudo iptables-save > ~/iptables-rules
## modify rules, remove drop and reject lines
grep -v "DROP" iptables-rules > tmpfile && mv tmpfile iptables-rules-mod
grep -v "REJECT" iptables-rules-mod > tmpfile && mv tmpfile iptables-rules-mod
## apply the modifications
sudo iptables-restore < ~/iptables-rules-mod
## check
sudo iptables -L
## save the changes
sudo netfilter-persistent save
sudo systemctl restart iptablescurl -sLS https://get.k3sup.dev | sh
sudo install k3sup /usr/local/bin/
## Verify installation
k3sup --helpIf you want to merge it with your existing kubeconfig
k3sup install \
--host <MASTER_NODE_IP_ADDRESS> \
--user ubuntu \
--ssh-key <PATH_TO_KEY_FILE> \
--context k3s-on-oracle \
--local-path $HOME/.kube/config \
--mergeIf you have no existing kubeconfig:
k3sup install \
--host <MASTER_NODE_IP_ADDRESS> \
--user ubuntu \
--ssh-key <PATH_TO_KEY_FILE> \
--context k3s-on-oracle \k3sup join \
--ip <AGENT_NODE_IP_ADDRESS> \
--server-ip <MASTER_NODE_IP_ADDRESS> \
--user ubuntu \
--ssh-key <PATH_TO_KEY_FILE>Install to cluster
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlGet admin password
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath='{.data.password}' | base64 --decodePort forward
kubectl port-forward svc/argocd-server -n argocd 8080:80ssh-keygen -t rsa -b 4096 -f github-deploy-keyhelm create whoamiannotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.middlewares: whoami-strip-prefix@kubernetescrdSimply paste this into the ingress.yaml at the bottom. IMPORTANT: Keep the ---!
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: strip-prefix
spec:
stripPrefix:
prefixes:
- /whoamihelm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.12.0 \
--set installCRDs=truehelm repo add cert-manager-webhook-ionos https://fabmade.github.io/cert-manager-webhook-ionos
helm install cert-manager-webhook-ionos cert-manager-webhook-ionos/cert-manager-webhook-ionos -ncert-managerEdit the configmap
kubectl edit configmap argocd-cmd-params-cm -n argocdAdd the following lines at the same level as kind and metadata
apiVersion: v1
data:
server.insecure: "true"
kind: ConfigMapRestart the deployment:
kubectl -n argocd rollout restart deployYou can choose any <RELEASE_NAME> you like, e.g. my-postgres
helm install <RELEASE_NAME> \
oci://registry-1.docker.io/bitnamicharts/postgresql \
-n bitnami-postgres \
--create-namespace \
--set auth.postgresPassword=<PASSWORD_FOR_POSTGRES_USER>curl --location 'https://<YOUR_DOMAIN>/shortme/shorten' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'original_url=https://www.google.com'