Created
August 14, 2024 23:56
-
-
Save GeoffMahugu/63b356745a230e046d5106c97364cda3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nextjs-web-app | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: nextjs-web-app | |
template: | |
metadata: | |
labels: | |
app: nextjs-web-app | |
spec: | |
containers: | |
- name: nextjs-web-app | |
image: nextjs-web-app:latest # Replace with your actual image | |
ports: | |
- containerPort: 3000 | |
resources: | |
limits: | |
cpu: "500m" | |
memory: "512Mi" | |
requests: | |
cpu: "250m" | |
memory: "256Mi" | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nextjs-web-app-service | |
spec: | |
selector: | |
app: nextjs-web-app | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 3000 | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: nextjs-web-app-ingress | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
nginx.ingress.kubernetes.io/ssl-redirect: "false" | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: nextjs-web-app-service | |
port: | |
number: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment