init k8s guide

This commit is contained in:
2023-08-22 20:52:48 +02:00
parent a8352635fe
commit b49dfc883d
6 changed files with 76 additions and 28 deletions

View File

@ -2,7 +2,7 @@
title: "Setup a HA Kubernetes cluster Part III - Load Balancer & Ingress with SSL"
date: 2023-10-03
description: "Follow this opinionated guide as starter-kit for your own Kubernetes platform..."
tags: ["kubernetes", "traefik", "cert-manager", "longhorn"]
tags: ["kubernetes", "traefik", "cert-manager"]
draft: true
---

View File

@ -2,7 +2,7 @@
title: "Setup a HA Kubernetes cluster Part IV - HA storage & DB"
date: 2023-10-04
description: "Follow this opinionated guide as starter-kit for your own Kubernetes platform..."
tags: ["kubernetes", "traefik", "cert-manager", "longhorn"]
tags: ["kubernetes", "longhorn", "bitnami", "postgresql", "redis"]
draft: true
---

View File

@ -2,7 +2,7 @@
title: "Setup a HA Kubernetes cluster Part V - CD with Flux"
date: 2023-10-05
description: "Follow this opinionated guide as starter-kit for your own Kubernetes platform..."
tags: ["kubernetes", "postgresql", "longhorn"]
tags: ["kubernetes", "cd", "flux", "nocode", "n8n", "nocodb"]
draft: true
---

View File

@ -1,8 +1,8 @@
---
title: "Setup a HA Kubernetes cluster Part VI - CI tools"
title: "Setup a HA Kubernetes cluster Part VI - Monitoring and Logging Stack"
date: 2023-10-06
description: "Follow this opinionated guide as starter-kit for your own Kubernetes platform..."
tags: ["kubernetes", "postgresql", "longhorn"]
tags: ["kubernetes", "monitoring", "logging", "prometheus", "loki", "grafana"]
draft: true
---
@ -12,24 +12,67 @@ Be free from AWS/Azure/GCP by building a production grade On-Premise Kubernetes
This is the **Part VI** of more global topic tutorial. [Back to first part]({{< ref "/posts/10-build-your-own-kubernetes-cluster" >}}) for intro.
Dev Only - skippable
Add runner-01
## Monitoring
## Gitea
Monitoring is a critical part of any production grade platform. It allows you to be proactive and react before your users are impacted. It also helps get a quick visualization of cluster architecture and current usage.
* Validate DB & redis access
* Enable SSH access
* First commit test with basic DotNet sample app
### Monitoring node pool
## Concourse CI
As well as storage pool, creating a dedicated node pool for monitoring stack is a good practice in order to scale it separately from the apps.
* Automatic build on commit
* Push to Gitea Container Registry
You now have a good understanding of how to create a node pool, so apply next configuration from our 1st Terraform project:
## Flux
{{< highlight host="demo-kube-hcloud" file="kube.tf" >}}
* Automatic deployment on commit
```tf
module "hcloud_kube" {
//...
## 3rd check ✅
agent_nodepools = [
//...
{
name = "monitor"
server_type = "cx21"
location = "nbg1"
count = 1
private_interface = "ens10"
labels = [
"node.kubernetes.io/server-usage=monitor"
]
taints = [
"node-role.kubernetes.io/monitor:NoSchedule"
]
}
]
}
```
We have everything we need for app building with automatic deployment ! Go [next part]({{< ref "/posts/15-build-your-own-kubernetes-cluster-part-6" >}}) to add complete monitoring stack !
{{< /highlight >}}
### Prometheus Stack
When using k8s, the standard de facto is to install [Prometheus stack](https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack). It includes all necessary CRDs and element for a proper monitoring stack.
Go back to 2nd Terraform project and apply next configuration:
{{< highlight host="demo-kube-k3s" file="prometheus.tf" >}}
```tf
```
{{< /highlight >}}
### Grafana
...
### Some dashboards
## Logging with Loki
...
## 5th check ✅
We now have a full monitoring suite ! Go [next part]({{< ref "/posts/16-build-your-own-kubernetes-cluster-part-7" >}}) to add continuous integration stack.

View File

@ -1,8 +1,8 @@
---
title: "Setup a HA Kubernetes cluster Part VII - Monitoring Stack"
title: "Setup a HA Kubernetes cluster Part VII - CI tools"
date: 2023-10-07
description: "Follow this opinionated guide as starter-kit for your own Kubernetes platform..."
tags: ["kubernetes", "prometheus", "loki", "grafana"]
tags: ["kubernetes", "ci", "gitea", "concourse"]
draft: true
---
@ -12,12 +12,17 @@ Be free from AWS/Azure/GCP by building a production grade On-Premise Kubernetes
This is the **Part VII** of more global topic tutorial. [Back to first part]({{< ref "/posts/10-build-your-own-kubernetes-cluster" >}}) for intro.
1. Add monitor-01
2. Prometheus Stack
3. Loki / Promtail
4. Grafana
5. Services Monitor & Dashboards
## Gitea
## 4th check ✅
* Validate DB & redis access
* Enable SSH access
* First commit test with basic DotNet sample app
We now have a full monitoring suite ! Go [next part]({{< ref "/posts/16-build-your-own-kubernetes-cluster-part-7" >}}) for advanced tracing / load testing.
## Concourse CI
* Automatic build on commit
* Push to Gitea Container Registry
## 6th check ✅
We have everything we need for app building with automatic deployment ! Go [next part]({{< ref "/posts/15-build-your-own-kubernetes-cluster-part-6" >}}) for advanced tracing / load testing !

View File

@ -2,7 +2,7 @@
title: "Setup a HA Kubernetes cluster Part VIII - Load testing & tracing"
date: 2023-10-08
description: "Follow this opinionated guide as starter-kit for your own Kubernetes platform..."
tags: ["kubernetes", "k6", "jaeger"]
tags: ["kubernetes", "load-testing", "k6", "tracing", "tempo"]
draft: true
---