Mise en place d'ArgoCD : début du transfert des docker compose vers kubern8 ==> suppression du docker compose pour nginx (remplacer par nginx-proxy.yaml
This commit is contained in:
@@ -22,8 +22,8 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: app
|
||||
image: devops-app:local # IMPORTANT : Utiliser l'image locale
|
||||
imagePullPolicy: IfNotPresent # Ne pas pull depuis Docker Hub
|
||||
image: devops-app:local
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
@@ -68,4 +68,61 @@ spec:
|
||||
targetPort: 8000
|
||||
protocol: TCP
|
||||
name: http
|
||||
type: NodePort # CORRIGÉ : NodePort au lieu de LoadBalancer pour Windows
|
||||
type: NodePort
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-proxy
|
||||
namespace: devops-demo
|
||||
labels:
|
||||
app: nginx-proxy
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx-proxy
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx-proxy
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
- containerPort: 443
|
||||
volumeMounts:
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
- name: certs
|
||||
mountPath: /etc/nginx/certs
|
||||
volumes:
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: nginx-config
|
||||
- name: certs
|
||||
secret:
|
||||
secretName: nginx-tls
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx-service
|
||||
namespace: devops-demo
|
||||
spec:
|
||||
selector:
|
||||
app: nginx-proxy
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
name: http
|
||||
- port: 443
|
||||
targetPort: 443
|
||||
protocol: TCP
|
||||
name: https
|
||||
type: NodePort
|
||||
Reference in New Issue
Block a user