Completed upto lesson 35

This commit is contained in:
Mosiur Rahman
2026-08-26 19:37:55 +06:00
parent 639e69484c
commit eaef1c17a7
20 changed files with 1586 additions and 0 deletions

50
lab/lesson-33-answer.yaml Normal file
View File

@@ -0,0 +1,50 @@
apiVersion: v1
kind: Namespace
metadata:
name: context-lab
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: report-api
namespace: context-lab
spec:
replicas: 1
selector:
matchLabels:
app: report-api
template:
metadata:
labels:
app: report-api
spec:
securityContext:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
volumes:
- name: log-exporter-vol
emptyDir: {}
containers:
- name: api
image: nginxinc/nginx-unprivileged:1.27-alpine
ports:
- containerPort: 8080
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
- name: log-exporter
image: busybox:1.37
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
readOnlyRootFilesystem: true
command: ["sh", "-c", "while true; do date >> /var/cache/exporter/events.log; sleep 30; done"]
volumeMounts:
- name: log-exporter-vol
mountPath: /var/cache/exporter