Skip to content

Instantly share code, notes, and snippets.

@D4rk4
Last active November 22, 2020 12:33
Show Gist options
  • Save D4rk4/1124501c0c610fd7d38d87227852b34a to your computer and use it in GitHub Desktop.
Save D4rk4/1124501c0c610fd7d38d87227852b34a to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Namespace
metadata:
name: echoserver
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: echoserver
namespace: echoserver
spec:
replicas: 2
selector:
matchLabels:
name: echoserver
template:
metadata:
labels:
name: echoserver
spec:
containers:
- image: datamanos/echoserver:latest
imagePullPolicy: Always
name: echoserver
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /
port: 8080
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: 8080
scheme: HTTP
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
limits:
cpu: 10m
memory: 256Mi
requests:
cpu: 5m
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: echoserver
namespace: echoserver
spec:
type: LoadBalancer
loadBalancerIP: 192.168.11.210
ports:
- port: 80
targetPort: 8080
protocol: TCP
selector:
app: echoserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment