2022-11-10 18:36:41 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: nginx-content
|
|
|
|
data:
|
|
|
|
index.html: |
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
2023-03-30 19:28:06 +00:00
|
|
|
<body>
|
|
|
|
Hello worldix
|
|
|
|
</body>
|
2022-11-10 18:36:41 +00:00
|
|
|
</html>
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: nginx
|
|
|
|
spec:
|
|
|
|
revisionHistoryLimit: 0
|
2023-03-30 19:28:06 +00:00
|
|
|
replicas: 3
|
2022-11-10 18:36:41 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: nginx
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: nginx
|
2023-03-30 19:28:06 +00:00
|
|
|
image: library/nginx:1.23.2
|
2022-11-10 18:36:41 +00:00
|
|
|
ports:
|
|
|
|
- name: nginx
|
|
|
|
containerPort: 80
|
|
|
|
volumeMounts:
|
|
|
|
- name: nginx-content
|
|
|
|
mountPath: /usr/share/nginx/html
|
|
|
|
volumes:
|
|
|
|
- name: nginx-content
|
|
|
|
configMap:
|
|
|
|
name: nginx-content
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: nginx
|
|
|
|
labels:
|
|
|
|
app: nginx
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: nginx
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 80
|
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: nginx
|
|
|
|
annotations:
|
|
|
|
kubernetes.io/ingress.class: shared
|
|
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
|
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
|
|
|
external-dns.alpha.kubernetes.io/target: traefik.codemowers.ee
|
|
|
|
spec:
|
|
|
|
rules:
|
2023-03-30 19:28:06 +00:00
|
|
|
- host: msergo-nginx-argo.codemowers.ee
|
2022-11-10 18:36:41 +00:00
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- pathType: Prefix
|
|
|
|
path: "/"
|
|
|
|
backend:
|
|
|
|
service:
|
|
|
|
name: nginx
|
|
|
|
port:
|
|
|
|
number: 80
|
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- "*.codemowers.ee"
|