Closed giuliohome closed 8 months ago
You need to set targetNamespace: default
to tell Flux where to deploy it.
See https://fluxcd.io/flux/get-started/#deploy-podinfo-application
Thank you!!!
Now I'm seeing
podinfo master@sha1:badf3271 False False health check failed after 43.990272ms: failed early due to stalled resources: [Deployment/default/podin
fo status: 'Failed', HorizontalPodAutoscaler/default/podinfo status: 'Unknown']
and from k8s get events:
11m Normal ScalingReplicaSet deployment/podinfo Scaled up replica set podinfo-85c45f85db to 2 from 1
78s Warning FailedGetResourceMetric horizontalpodautoscaler/podinfo failed to get cpu utilization: unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server could not find the requested resource (get pods.metrics.k8s.io)
8m18s Warning FailedComputeMetricsReplicas horizontalpodautoscaler/podinfo invalid metrics (1 invalid out of 1), first error is: failed to get cpu resource metric value: failed to get cpu utilization: unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server could not find the requested resource (get pods.metrics.k8s.io)
To use HPA you need metrics-server, which Kubernetes distribution are you using?
Hi, thanks again it's DigitalOcean 2 nodes s-1vcpu-2gb - 1.28.2-do.0 maybe too low the cpu or other resources?
I'm adding a third node now, if it can help...
You need to install metrics-server, probably DigitalOcean, unlike most cloud vendors, don't set it up for you.
You can install metrics-server with Flux like so:
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: metrics-server
namespace: flux-system
spec:
interval: 24h
url: https://kubernetes-sigs.github.io/metrics-server/
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: metrics-server
namespace: flux-system
spec:
interval: 30m
targetNamespace: kube-system
chart:
spec:
chart: metrics-server
version: "*"
sourceRef:
kind: HelmRepository
name: metrics-server
interval: 12h
values:
args:
- --kubelet-insecure-tls
wow :tada: thank you again !!!!!
I see the following error message
and this is my configuration