Skip to content

Commit c5f21cd

Browse files
committed
Updates after 20231011
1 parent fc5cd39 commit c5f21cd

File tree

7 files changed

+34
-11
lines changed

7 files changed

+34
-11
lines changed

120_kubernetes/04_pods/pod.demo

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Starting pods
22

33
## Starting a pod using kubectl
4-
kubectl run -it --image=alpine --rm --command -- bash
4+
kubectl run -it --image=alpine --rm --command -- sh
55

66
## Remove pod using kubectl
7-
kubectl delete pod bash
7+
kubectl delete pod sh
88

99
## View pods (pod is gone)
1010

120_kubernetes/30_ingress/infrastructure-as-code.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ metadata:
55
name: traefik-dashboard
66
spec:
77
endpoints:
8-
- dnsName: traefik.seat0.inmylab.de
8+
- dnsName: ${DNS_NAME}
99
recordTTL: 300
10-
recordType: A
10+
recordType: CNAME
1111
targets:
1212
- lb.seat0.inmylab.de
1313
---
@@ -21,19 +21,21 @@ spec:
2121
name: letsencrypt-prod
2222
kind: ClusterIssuer
2323
dnsNames:
24-
- traefik.seat0.inmylab.de
24+
- ${DNS_NAME}
2525
---
2626
apiVersion: traefik.io/v1alpha1
2727
kind: IngressRoute
2828
metadata:
2929
name: traefik-dashboard
3030
spec:
3131
entryPoints:
32-
- http
32+
- https
3333
routes:
34-
- match: Host(`traefik.seat0.inmylab.de`)
34+
- match: Host(`${DNS_NAME}`)
3535
kind: Rule
3636
services:
3737
- name: traefik-dashboard
3838
port: 80
3939
strategy: RoundRobin
40+
tls:
41+
secretName: traefik-dashboard

120_kubernetes/30_ingress/proxy.demo

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# kubectl proxy
2+
3+
## Start proxy
4+
kubectl proxy
5+
6+
## Access service
7+
curl -s http://127.0.0.1:8001/api/v1/namespaces/default/services/web:80/proxy/

120_kubernetes/30_ingress/proxy.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## `kubectl proxy`
2+
3+
XXX
4+
5+
### Demo
6+
7+
Commands [](https://github.com/nicholasdille/container-slides/blob/master/120_kubernetes/30_ingress/proxy.demo)

120_kubernetes/30_ingress/slides.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,18 @@ Use with single node Docker for testing
9696

9797
Supports HTTP(S) and TCP
9898

99-
Resource definition `Middleware` to mutate requests and responses
99+
Resource definition `Middleware` to mutate requests and responses, e.g.
100+
101+
- Redirect (permanently) using `RedirectRegEx`
102+
- Rewriting paths using `ReplacePathRegex`
103+
- Managing request and response headers using `Headers`
100104

101105
Dashboard to inspect active configuration
102106

103-
### Demo
107+
### Demo [](https://github.com/nicholasdille/container-slides/blob/master/120_kubernetes/30_ingress/traefik.demo)
104108

105109
Deploy traefik as ingress controller using a host port
106110

107111
Deploy demo applications `foo` and `bar`
108112

109113
Add `IngressRoute` resources
110-
111-
Commands [](https://github.com/nicholasdille/container-slides/blob/master/120_kubernetes/30_ingress/traefik.demo)

120_kubernetes/30_ingress/traefik.demo

+3
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ kubectl apply -f traefik.yaml
1414
## Deploy demo services
1515
kubectl apply -f demo.yaml
1616

17+
## Deploy IngressRoute
18+
kubectl apply -f ingressroute.yaml
19+
1720
## Test connection
1821
curl --silent --resolve traefik.seat0.inmylab.de:80:127.0.0.1 http://traefik.seat0.inmylab.de/dashboard/

2023-11-03_heise-Kubernetes-absichern.html

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454

5555
<!--
5656
TODO: RBAC, Policies, Network Policies, SBoM, Supply Chain Security
57+
58+
TODO: RBAC finden von sub-resources pod/exec
5759
-->
5860

5961
<section data-markdown="" data-separator="^---$" data-separator-vertical="^--$"><textarea data-template="">

0 commit comments

Comments
 (0)