Skip to content

Instantly share code, notes, and snippets.

@oscar60310
Created December 23, 2020 06:44
Show Gist options
  • Save oscar60310/b0266351a04cc436460bf6e6a8492400 to your computer and use it in GitHub Desktop.
Save oscar60310/b0266351a04cc436460bf6e6a8492400 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: presto-worker
labels:
app: presto-worker
spec:
replicas: 1
selector:
matchLabels:
component: presto-worker
app: presto-worker
template:
metadata:
labels:
component: presto-worker
app: presto-worker
spec:
containers:
- name: presto-worker
image: oscar60310/k8s-test
resources:
requests:
memory: 100Mi
limits:
memory: 100Mi
cpu: 500m
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: presto-coordinator
labels:
app: presto-coordinator
spec:
replicas: 1
selector:
matchLabels:
component: presto-coordinator
app: presto-coordinator
template:
metadata:
labels:
component: presto-coordinator
app: presto-coordinator
spec:
containers:
- name: presto-coordinator
image: oscar60310/k8s-test
resources:
requests:
memory: 100Mi
limits:
memory: 100Mi
cpu: 500m
---
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
metadata:
name: presto
namespace: default
spec:
scaleTargetRef:
kind: Deployment
name: presto-worker
apiVersion: apps/v1
minReplicas: 1
maxReplicas: 1
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment