first commit

This commit is contained in:
2025-11-06 06:41:45 +01:00
commit b8dceaf896
92 changed files with 5382 additions and 0 deletions

64
pods/pod-sidecar.yaml Normal file
View File

@@ -0,0 +1,64 @@
# kind create cluster --name pods --image kindest/node:v1.31.1
apiVersion: v1
kind: Pod
metadata:
name: example-pod
namespace: default
labels:
app: example-app
spec:
shareProcessNamespace: true
nodeSelector:
kubernetes.io/os: linux
containers:
- name: config-watcher
image: alpine:latest
command: ["/bin/sh", "-c"]
args:
- |
apk add --no-cache inotify-tools
while true; do
inotifywait -e modify /etc/nginx/nginx.conf
pkill -HUP nginx
done
volumeMounts:
- name: config-volume
mountPath: /etc/nginx/
- name: nginx
image: nginx:latest
imagePullPolicy: Always
ports:
- containerPort: 80
volumeMounts:
- name: config-volume
mountPath: /etc/nginx/
volumes:
- name: config-volume
configMap:
name: nginx-config
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
data:
nginx.conf: |
events {}
http {
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location = /health {
access_log off;
default_type text/plain;
add_header Content-Type text/plain;
return 200 "ok";
}
}
}

38
pods/pod.yaml Normal file
View File

@@ -0,0 +1,38 @@
# kind create cluster --name pods --image kindest/node:v1.31.1
# kubectl apply -f pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: example-pod
namespace: default
labels:
app: example-app
test: test
spec:
nodeSelector:
kubernetes.io/os: linux
containers:
- name: example-app
image: aimvector/python:1.0.4
imagePullPolicy: Always
ports:
- containerPort: 5000
livenessProbe:
httpGet:
path: /
port: 5000
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /
port: 5000
initialDelaySeconds: 3
periodSeconds: 3
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "500m"