I want to use HPA on the frontend service, but I get <unknown>
rather than a number
Commands ran:
NAME READY UP-TO-DATE AVAILABLE AGE
metrics-server 0/1 1 0 21s
No resources found in default namespace
horizontalpodautoscaler.autoscaling/udagram-frontend autoscaled
deployment file
apiVersion: apps/v1
kind: Deployment
metadata:
name: udagram-frontend
labels:
service: udagram-frontend
spec:
replicas: 2
selector:
matchLabels:
service: udagram-frontend
template:
metadata:
labels:
service: udagram-frontend
api: external
spec:
containers:
- name: udagram-frontend
image: oussamabouchikhi/udagram-frontend:latest
imagePullPolicy: Always
ports:
- containerPort: 80
resources:
requests:
memory: '64Mi'
cpu: '250m'
limits:
memory: '1024Mi'
cpu: '500m'
restartPolicy: Always
Github repo: https://github.com/oussamabouchikhi/udagram-microservices