baseline/README.md

52 lines
1.9 KiB
Markdown
Raw Normal View History

2021-11-28 22:36:39 +00:00
# Kubernetes Baseline
Run `kubectl apply -f init.yml` to install:
2022-03-21 09:23:56 +00:00
* [ArgoCD](https://argoproj.github.io/cd/)
* [NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/)
* [cert-manager](https://cert-manager.io/)
* [prometheus and grafana](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)
* [loki](https://grafana.com/docs/loki/latest/)
* [keel](https://keel.sh)
* [reloader](https://github.com/stakater/Reloader)
2022-01-05 22:10:37 +00:00
## Installation (k3s + baseline)
`ansible-playbook -i <host|ip>, install.yml`
## Installation (baseline only)
2022-01-05 22:10:37 +00:00
make sure kubectl is configure to reach the destination cluster, then:
`kubectl apply -f init.yml`
## Notes
2022-01-05 22:10:37 +00:00
### Linode
2022-02-03 07:30:12 +00:00
PROXY protocol needs to be enabled for ingress-nginx to see the clients IP in ingress log.
2022-01-05 22:10:37 +00:00
2022-02-03 07:30:12 +00:00
Add the PROXY protocol annotation to the ingress-nginx service:
2022-01-05 22:10:37 +00:00
```
annotations:
service.beta.kubernetes.io/linode-loadbalancer-proxy-protocol: v2
2022-01-05 22:10:37 +00:00
```
2022-02-03 07:30:12 +00:00
Update the ingress-nginx ConfigMap to make nginx expect PROXY protocol data:
2022-01-05 22:10:37 +00:00
```
data:
use-proxy-protocol: "true"
```
#### cert-manager
> However, when you have the PROXY protocol enabled, the external load balancer does modify the traffic, prepending the PROXY line before each TCP connection. If you connect directly to the web server internally, bypassing the external load balancer, then it will receive traffic without the PROXY line.
>
> This is particularly a problem when using cert-manager for provisioning SSL certificates.
After enabling the PROXY protocol cert-manager is unable to perform a self check ("propagation check failed", "failed to perform self check GET request").
[hairpin-proxy](https://github.com/compumike/hairpin-proxy) adds PROXY protocol support for internal-to-LoadBalancer traffic for Kubernetes Ingress users, specifically for cert-manager self-checks (no further configuration needed).