xxxxxxxxxx
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
xxxxxxxxxx
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: 111111111111.dkr.ecr.us-east-2.amazonaws.com/myapp:latest
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- name: tcp
containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: myapp
spec:
selector:
app: myapp
ports:
- port: 80
targetPort: 8080
type: LoadBalancer