84 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			84 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| apiVersion: apps/v1
 | |
| kind: Deployment
 | |
| metadata:
 | |
|   name: portfolio-app
 | |
|   labels:
 | |
|     app: portfolio-app
 | |
| spec:
 | |
|   replicas: 1
 | |
|   selector:
 | |
|     matchLabels:
 | |
|       app: portfolio-app
 | |
|   template:
 | |
|     metadata:
 | |
|       labels:
 | |
|         app: portfolio-app
 | |
|     spec:
 | |
|       imagePullSecrets:
 | |
|       - name: my-registry-secret
 | |
|       containers:
 | |
|       - name: portfolio-app
 | |
|         image: "${DOCKER_REGISTRY_HOST}/my-portfolio-app:latest"
 | |
|         imagePullPolicy: Always
 | |
|         ports:
 | |
|         - containerPort: 80
 | |
|       restartPolicy: Always
 | |
|       terminationGracePeriodSeconds: 30
 | |
| ---
 | |
| apiVersion: v1
 | |
| kind: Service
 | |
| metadata:
 | |
|   name: portfolio-app-svc
 | |
| spec:
 | |
|   type: ClusterIP
 | |
|   ports:
 | |
|   - port: 80
 | |
|     targetPort: 80
 | |
|   selector:
 | |
|     app: portfolio-app
 | |
| 
 | |
| ---
 | |
| apiVersion: networking.k8s.io/v1
 | |
| kind: Ingress
 | |
| metadata:
 | |
|   name: portfolio
 | |
|   annotations:
 | |
|     traefik.ingress.kubernetes.io/router.entrypoints: websecure
 | |
| spec:
 | |
|   tls:
 | |
|   - hosts:
 | |
|       - "${DNSNAME}"
 | |
|     secretName: wildcard-cert-secret
 | |
|   rules:
 | |
|   - host: "${PORTFOLIO_HOST}"
 | |
|     http:
 | |
|       paths:
 | |
|       - path: /
 | |
|         pathType: Prefix
 | |
|         backend:
 | |
|           service:
 | |
|             name: portfolio-app-svc
 | |
|             port:
 | |
|               number: 80
 | |
|       - path: /experience
 | |
|         pathType: Prefix
 | |
|         backend:
 | |
|           service:
 | |
|             name: react-app-service
 | |
|             port:
 | |
|               number: 80
 | |
|       - path: /interest
 | |
|         pathType: Prefix
 | |
|         backend:
 | |
|           service:
 | |
|             name: react-app-service
 | |
|             port:
 | |
|               number: 80
 | |
|       - path: /project
 | |
|         pathType: Prefix
 | |
|         backend:
 | |
|           service:
 | |
|             name: react-app-service
 | |
|             port:
 | |
|               number: 80
 |