Skip to content

Instantly share code, notes, and snippets.

@krishnasrinivas
Created December 21, 2021 00:01
Show Gist options
  • Save krishnasrinivas/d86f6dd263937dc6a14aae5c09dbb0d2 to your computer and use it in GitHub Desktop.
Save krishnasrinivas/d86f6dd263937dc6a14aae5c09dbb0d2 to your computer and use it in GitHub Desktop.
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: throughput1
namespace: ns-4
spec:
podManagementPolicy: Parallel
replicas: 8
selector:
matchLabels:
app: throughput1
serviceName: "throughput1"
template:
metadata:
labels:
app: throughput1
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- throughput1
topologyKey: "kubernetes.io/hostname"
containers:
- name: throughput1
image: krishnasrinivas/mperf:ubuntu3
resources:
limits:
cpu: "8"
memory: 8Gi
requests:
cpu: "10m"
memory: 10Mi
ports:
- containerPort: 9999
name: "port1"
- containerPort: 10000
name: "port2"
env:
- name: throughput1_DATADIR
value: "/throughput1data"
args:
- throughput1-0.throughput1.ns-4.svc.cluster.local
- throughput1-1.throughput1.ns-4.svc.cluster.local
- throughput1-2.throughput1.ns-4.svc.cluster.local
- throughput1-3.throughput1.ns-4.svc.cluster.local
- throughput1-4.throughput1.ns-4.svc.cluster.local
- throughput1-5.throughput1.ns-4.svc.cluster.local
- throughput1-6.throughput1.ns-4.svc.cluster.local
- throughput1-7.throughput1.ns-4.svc.cluster.local
---
apiVersion: v1
kind: Service
metadata:
name: throughput1
namespace: ns-4
labels:
app: throughput1
spec:
ports:
- port: 9999
name: "port1"
- port: 10000
name: "port2"
clusterIP: None
selector:
app: throughput1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment