Skip to content

Commit

Permalink
back to 2 worker nodes, updates for LB related labs
Browse files Browse the repository at this point in the history
  • Loading branch information
koksay committed Jul 17, 2024
1 parent 63d4b26 commit 1c96c03
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 34 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/base/kind-cluster-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ nodes:
image: kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e
- role: worker
image: kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e
- role: worker
image: kindest/node:v1.30.0@sha256:047357ac0cfea04663786a612ba1eaba9702bef25227a794b52890dd8bcd692e
networking:
# Cilium will be installed for Network Policies
disableDefaultCNI: true
2 changes: 1 addition & 1 deletion labs/22_ingress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ echo "https://${CODESPACE_NAME}-80.app.github.dev/blue"

```bash
kubectl delete -f .
kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.9.5/deploy/static/provider/cloud/deploy.yaml
helm uninstall ingress-nginx -n ingress-nginx
```
50 changes: 22 additions & 28 deletions labs/29_prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,11 @@ kubectl create -f pod.yaml

## Prometheus deployment

* Add the prometheus-community helm repo

```bash
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
```

* Search for a prometheus chart via helm

```bash
helm search repo prometheus
```

* Install prometheus

```bash
helm install my-prometheus prometheus-community/prometheus -f prometheus-values.yaml
helm install my-prometheus prometheus \
--repo https://prometheus-community.github.io/helm-charts
```

* Take a look at the installed resources
Expand All @@ -42,12 +30,16 @@ kubectl create -f pod.yaml
kubectl get all
```

* Visit the prometheus UI in the browser
* Visit the prometheus UI in the browser by port-forwarding to reach the codespaces instance:

Get the External IP of the service
```bash
kubectl port-forward svc/my-prometheus-server 80
```

* Reach via below URL:

```bash
kubectl get svc my-prometheus-server
echo "https://${CODESPACE_NAME}-80.app.github.dev
```
* Execute some query over the "graph" page in your browser
Expand All @@ -59,31 +51,32 @@ kubectl create -f pod.yaml
## Grafana
* Add the grafana helm repo
* Install grafana
```bash
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm install my-grafana grafana \
--repo https://grafana.github.io/helm-charts \
-f grafana-values.yaml
```
* Install grafana
* Visit the grafana UI in the browser by Port-forwarding to reach the codespaces instance:
```bash
helm install my-grafana grafana/grafana -f grafana-values.yaml
kubectl port-forward svc/my-grafana 80
```
* Visit the grafana UI in the browser
Get the External IP of the service
* Reach via below URL:
```bash
kubectl get svc
```bash
echo "https://${CODESPACE_NAME}-80.app.github.dev
```

* Add Prometheus as data source to Grafana
* Choose the Option `Configuration`/`Data Sources`
* Choose the Option `Connections`/`Data Sources`
* Click on `Add Data Source`
* Choose type `Prometheus`
* Insert URL `http://my-prometheus-server` and click `Save & Test`
* Choose the Option `Dashboards`/`Manage`/`Import`
* Choose the Option `Dashboards`/`New`/`Import`
* Paste the number 1860 into the field `Grafana.com Dashboard` and click `Load` (Visit [https://grafana.com/grafana/dashboards](https://grafana.com/grafana/dashboards) for other Dashboards)
* Choose the Datasource Prometheus in the field `Prometheus` and `Import` afterwards
* Investigate the Dashboard; take care to a proper time range via the button on the right above
Expand All @@ -97,3 +90,4 @@ kubectl create -f pod.yaml
helm delete my-prometheus
kubectl delete pod my-pod
```

2 changes: 0 additions & 2 deletions labs/29_prometheus/grafana-values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
adminPassword: myPassw0rd
service:
type: LoadBalancer
3 changes: 0 additions & 3 deletions labs/29_prometheus/prometheus-values.yaml

This file was deleted.

0 comments on commit 1c96c03

Please sign in to comment.