Skip to content

Commit

Permalink
ADding 2024 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelpoulton committed Jan 24, 2024
1 parent 8800d13 commit 7f441fa
Show file tree
Hide file tree
Showing 14 changed files with 120 additions and 16 deletions.
2 changes: 1 addition & 1 deletion configmaps/cmfile.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Kubernetes FTW
Kubernetes FTW!
4 changes: 4 additions & 0 deletions deployments/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ spec:
image: nigelpoulton/k8sbook:1.0
ports:
- containerPort: 8080
resources:
limits:
memory: 128Mi
cpu: 0.1
8 changes: 4 additions & 4 deletions installation/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ networking:
ipFamily: dual
nodes:
- role: control-plane
image: kindest/node:v1.26.0
image: kindest/node:v1.29.0
- role: worker
image: kindest/node:v1.26.0
image: kindest/node:v1.29.0
- role: worker
image: kindest/node:v1.26.0
image: kindest/node:v1.29.0
- role: worker
image: kindest/node:v1.26.0
image: kindest/node:v1.29.0
33 changes: 33 additions & 0 deletions namespaces/app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: shield
name: default
---
apiVersion: v1
kind: Service
metadata:
namespace: shield
name: the-bus
spec:
type: LoadBalancer
ports:
- port: 8080
targetPort: 8080
selector:
env: marvel
---
apiVersion: v1
kind: Pod
metadata:
namespace: shield
name: triskelion
labels:
env: marvel
spec:
containers:
- image: nigelpoulton/k8sbook:shield-01
name: bus-ctr
ports:
- containerPort: 8080
imagePullPolicy: Always
4 changes: 4 additions & 0 deletions pods/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ spec:
image: nigelpoulton/k8sbook:1.0
ports:
- containerPort: 8080
resources:
limits:
memory: 256Mi
cpu: 0.5
4 changes: 0 additions & 4 deletions service-discovery/sd-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ apiVersion: apps/v1
metadata:
name: enterprise
namespace: dev
labels:
app: enterprise
spec:
selector:
matchLabels:
Expand All @@ -37,8 +35,6 @@ apiVersion: apps/v1
metadata:
name: enterprise
namespace: prod
labels:
app: enterprise
spec:
selector:
matchLabels:
Expand Down
10 changes: 10 additions & 0 deletions services/kind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: tkb
networking:
ipFamily: dual
nodes:
- role: control-plane
image: kindest/node:v1.29.0
- role: worker
image: kindest/node:v1.29.0
4 changes: 2 additions & 2 deletions services/kindlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ networking:
ipFamily: dual
nodes:
- role: control-plane
image: kindest/node:v1.25.3
image: kindest/node:v1.29.0
- role: worker
image: kindest/node:v1.25.3
image: kindest/node:v1.29.0
```

#### Deploy the KinD cluster
Expand Down
2 changes: 1 addition & 1 deletion services/svc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
ports:
- port: 8080
nodePort: 30001
targetPort: 8080
targetPort: 9090

This comment has been minimized.

Copy link
@schferbe

schferbe Jan 31, 2024

@nigelpoulton When I tried this example it only worked with targetPort: 8080.

protocol: TCP
selector:
chapter: services
7 changes: 7 additions & 0 deletions statefulsets/dd-sc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: flash
provisioner: docker.io/hostpath
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: false
4 changes: 2 additions & 2 deletions statefulsets/jump-pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
terminationGracePeriodSeconds: 1
containers:
- image: nigelpoulton/curl:1.0
- image: registry.k8s.io/e2e-test-images/jessie-dnsutils:1.7
name: jump-ctr
tty: true
stdin: true
stdin: true
2 changes: 1 addition & 1 deletion statefulsets/sts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: StatefulSet
metadata:
name: tkb-sts
spec:
replicas: 3
replicas: 3
selector:
matchLabels:
app: web
Expand Down
2 changes: 1 addition & 1 deletion storage/sc-gke-fast-repl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ reclaimPolicy: Retain
# - key: topology.kubernetes.io/zone
# values:
# - europe-west2-b
# - europe-west2-c
# - europe-west2-c
50 changes: 50 additions & 0 deletions wasm/app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: wasm-spin
spec:
replicas: 3
selector:
matchLabels:
app: wasm-spin
template:
metadata:
labels:
app: wasm-spin
spec:
runtimeClassName: rc-spin
containers:
- name: testwasm
image: nigelpoulton/k8sbook:wasm-0.1
command: ["/"]
---
apiVersion: v1
kind: Service
metadata:
name: svc-wasm
spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
selector:
app: wasm-spin
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ing-wasm
annotations:
ingress.kubernetes.io/ssl-redirect: "false"
spec:
ingressClassName: traefik
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: svc-wasm
port:
number: 80

0 comments on commit 7f441fa

Please sign in to comment.