@@ -0,0 +1,82 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: nginx-app
+---
+apiVersion: apps/v1
+kind: Deployment
+ name: nginx-deployment
+ namespace: nginx-app
+ labels:
+ app: nginx
+spec:
+ replicas: 3
+ selector:
+ matchLabels:
+ template:
+ metadata:
+ spec:
+ containers:
+ - name: nginx
+ image: registry.cn-hangzhou.aliyuncs.com/zhongpengqun/wanderer:linux-amd64-nginx-stable-alpine-3.23
+ ports:
+ - containerPort: 80
+ resources:
+ requests:
+ memory: "64Mi"
+ cpu: "250m"
+ limits:
+ memory: "128Mi"
+ cpu: "500m"
+ readinessProbe:
+ httpGet:
+ path: /
+ port: 80
+ initialDelaySeconds: 5
+ periodSeconds: 5
+ livenessProbe:
+ initialDelaySeconds: 10
+ periodSeconds: 10
+
+kind: Service
+ name: nginx-service
+ - protocol: TCP
+ targetPort: 80
+ type: ClusterIP
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+ name: nginx-ingress
+ rules:
+ - host: nginx.local
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ port:
+ number: 80
@@ -68,9 +68,8 @@ kind: Ingress
metadata:
name: nginx-ingress
namespace: nginx-app
- annotations:
- kubernetes.io/ingress.class: "traefik" # Using traefik which is typically available in k3s
spec:
+ ingressClassName: traefik # Using traefik which is typically available in k3s
rules:
- host: nginx.local
http: