K8S not running POD only in k8s but working in K3S and Minikube

Been getting this error from many days initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘processorMetrics’ defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/SystemMetricsAutoConfiguration.class]: Failed to instantiate [io.micrometer.core.instrument.binder.system.ProcessorMetrics]: Factory method ‘processorMetrics’ threw exception with message: java.lang.reflect.InvocationTargetException
this only happens in k8s and not in k3s and minikube why??

I’m experiencing the same error. Has anyone solved this problem?