To reconcile manually
flux reconcile kustomization argocd-config -n flux-system
-
Run the following command to install Flux CD:
curl -s https://fluxcd.io/install.sh | sudo bash
-
Provision resources:
make provision
-
Manually add repository credentials for the Argo CD repositories:
- Create
repo-creds.yaml
with your Git credentials:
kubectl apply -f <<EOF apiVersion: v1 kind: Secret metadata: name: private-repo-creds namespace: argocd labels: argocd.argoproj.io/secret-type: repo-creds stringData: type: git url: https://github.com/1ndistinct password: my-password username: my-username EOF
- Apply the credentials:
make apply-argo-repo-creds
- Create
-
Port forward Argo CD server:
kubectl port-forward svc/argocd-server -n argocd 8080:443
-
Due to network routing, other pods won't have internet access. Use this node primarily for storage and pods that don't need internet. Add a taint and label to the node:
kubectl taint nodes node1 networkmode=host:NoSchedule kubectl label nodes node1 networkmode=host
-
Add the following settings to your Wireguard configuration:
PostUp = sysctl -w -q net.ipv4.ip_forward=1; iptables -A FORWARD -i §g0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE PostDown = sysctl -w -q net.ipv4.ip_forward=0; iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
-
Find cluster DNS to set client DNS to:
kubectl -n kube-system get svc | grep kube-dns | awk '{print $3}'
-
Install kubeseal
-
Fetch the Sealed Secrets Public Key:
kubeseal --controller-namespace sealed-secrets --controller-name sealed-secrets --fetch-cert > publickey.pem
-
Template the secret into a YAML file (
mysecret.yaml
): -
Seal the secret:
kubeseal --format yaml < mysecret.yaml --cert publickey.pem > mysealedsecret.yaml
-
Commit and push the sealed secret.
- Swap PostgreSQL secrets to external secrets
This guide provides steps to access the Grafana dashboard/Prometheus running on a Kubernetes cluster on a remote Ubuntu server from a local server using an SSH tunnel.
-
Port forward Grafana service:
kubectl port-forward svc/prometheus-grafana 3000:80 -n monitoring
-
Create an SSH tunnel:
ssh -L 3000:localhost:3000 username@remote-server
-
Access Grafana at
http://localhost:3000
-
Default username is
admin
and the password can be found in themonitoring/prometheus/prometheus.yaml
file under theadminPassword
in Grafana block.
-
Port forward Prometheus service:
kubectl port-forward svc/prometheus-kube-prometheus-prometheus 9090:9090 -n monitoring
-
Create an SSH tunnel:
ssh -N -L 3001:localhost:9090 username@remote-server
-
Access Prometheus at
http://localhost:3001
+++
Polaris is an tool designed to enforce best practices in Kubernetes configurations. It runs audits on your Kubernetes clusters to ensure they are using best practices, helping to improve the security, efficiency, and reliability of your deployments.
Why it is useful:
Polaris helps identify configuration issues that can affect the stability and performance of your Kubernetes applications. By providing actionable insights, it allows teams to proactively address potential problems, ensuring a more robust and secure environment.
Accessing Polaris Dashboard:
-
Port forward the Polaris dashboard service:
kubectl port-forward svc/polaris-dashboard 8080:80 -n polaris
-
Create an SSH tunnel:
ssh -L 8080:localhost:8080 username@remote-server
-
Access Polaris Dashboard at
http://localhost:8080
The Kubernetes Dashboard is a web-based UI for managing Kubernetes clusters. It provides an overview of the cluster’s resources and allows users to deploy containerized applications, troubleshoot, and manage cluster resources.
Why it is useful:
The Kubernetes Dashboard simplifies cluster management by providing an intuitive interface to monitor and manage resources, view logs, and troubleshoot issues without needing to use the command line.
Accessing Kubernetes Dashboard:
-
Port forward the Kubernetes Dashboard service:
kubectl port-forward svc/kubernetes-dashboard 8001:443 -n kubernetes-dashboard
-
Create an SSH tunnel:
ssh -L 8001:localhost:8001 username@remote-server
-
Access Kubernetes Dashboard at
https://localhost:8001
-
Use the Kubernetes Dashboard to manage and monitor your cluster, deploy applications, and troubleshoot issues.