Hello everyone i'm trying to deploy Heartbeat on kubernetes to monitor kubernetes components.
i got the yaml file from official elastic documentation. yaml file
this is the full configuration file:
apiVersion: apps/v1
kind: Deployment
metadata:
name: heartbeat
namespace: kube-system
labels:
k8s-app: heartbeat
spec:
selector:
matchLabels:
k8s-app: heartbeat
template:
metadata:
labels:
k8s-app: heartbeat
spec:
serviceAccountName: heartbeat
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: heartbeat
image: docker.elastic.co/beats/heartbeat:7.17.6
args: [
"-c", "/etc/heartbeat.yml",
"-e",
]
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
securityContext:
runAsUser: 0
resources:
limits:
memory: 1536mi
requests:
# for synthetics, 2 full cores is a good starting point for
relatively consistent perform of a single concurrent check
# For lightweight checks as low as 100m is fine
cpu: 2000m
# A high value like this is encouraged for browser based
monitors.
# Lightweight checks use substantially less, even 128Mi is fine
for those.
memory: 1536Mi
volumeMounts:
- name: config
mountPath: /etc/heartbeat.yml
readOnly: true
subPath: heartbeat.yml
- name: data
mountPath: /usr/share/heartbeat/data
volumes:
- name: config
configMap:
defaultMode: 0600
name: heartbeat-deployment-config
- name: data
hostPath:
path: /var/lib/heartbeat-data
type: DirectoryOrCreate
now it's giving me this error "error when creating "heartbeat-kubernetes.yaml": Deployment in version "v1" cannot be handled as a Deployment: unable to parse quantity's suffix".
when applying the yamlfile i get that `
configmap/heartbeat-deployment-config unchanged
clusterrolebinding.rbac.authorization.k8s.io/heartbeat unchanged
rolebinding.rbac.authorization.k8s.io/heartbeat unchanged
rolebinding.rbac.authorization.k8s.io/heartbeat-kubeadm-config
unchanged
clusterrole.rbac.authorization.k8s.io/heartbeat unchanged
role.rbac.authorization.k8s.io/heartbeat unchanged
role.rbac.authorization.k8s.io/heartbeat-kubeadm-config unchanged
serviceaccount/heartbeat unchanged`
eveything is good except the deployment part.
any help would be appreciated and thank you.