- solutions
- prometheus
- metrics-server
- to get memory consumtion per node
kubectl top node
- to get memory consumtion per node
- logging
- to see logs from pod live with one container
kubectl logs -f <pod-name>
- to see logs from pod live with more than one container
kubectl logs -f <pod-name> <container-name>
- shared volume for multiple containers in a pod (elastic-search)
apiVersion: v1 kind: Pod metadata: name: app namespace: elastic-stack labels: name: app spec: containers: - name: app image: kodekloud/event-simulator volumeMounts: - mountPath: /log name: log-volume - name: sidecar image: kodekloud/filebeat-configured volumeMounts: - mountPath: /var/log/event-simulator/ name: log-volume volumes: - name: log-volume hostPath: # directory location on host path: /var/log/webapp # this field is optional type: DirectoryOrCreate
- to see logs from pod live with one container