Skip to content

Instantly share code, notes, and snippets.

@arn-ob
Created September 3, 2023 08:18
Show Gist options
  • Save arn-ob/922d6546e49b184c83cff70427887a81 to your computer and use it in GitHub Desktop.
Save arn-ob/922d6546e49b184c83cff70427887a81 to your computer and use it in GitHub Desktop.
Paketler Backend yaml
---
apiVersion: v1
kind: Service
metadata:
name: paketler-backend-service
namespace: default
spec:
selector:
app: paketler-backend-app
ports:
- protocol: "TCP"
port: 80
targetPort: 5000
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: paketler-backend-app
namespace: default
spec:
progressDeadlineSeconds: 600
selector:
matchLabels:
app: paketler-backend-app
replicas: 1
revisionHistoryLimit: 5
strategy:
rollingUpdate:
maxSurge: 50%
maxUnavailable: 50%
type: RollingUpdate
template:
metadata:
labels:
app: paketler-backend-app
spec:
containers:
- name: paketler-backend-app
image: arnobdev/paketler-backend:main-5bb3eac
ports:
- containerPort: 5000
name: api-port
protocol: TCP
resources:
limits:
cpu: 150m
memory: 300Mi
requests:
cpu: 50m
memory: 50Mi
imagePullSecrets:
- name: regcred
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: paketler-backend-ingress
namespace: default
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
rules:
- host: api.paketler.xyz
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: paketler-backend-service
port:
number: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment