I am trying to monitor filesystem usage for pods in k8s. I am using Kubernetes (microk8s) and hostpath persistent volumes. I am running Kafka along with a number of producers to see what happens when I go past the PVC size limit among other things. I have tried getting information from the API server but it is not reported there. Since it is only using hostpath, that kind of makes sense. It is not a dynamic volume system. Doing df on the host just shows all of the volumes with the same utilization as the root filesystem. This is the same result using exec -- df within the container. There are no pvcRefs on the containers using api server, which kind of explains why the dashboard doesn't have this information. Is this a dead end or does someone have a way around this limitation? I am now wondering if the PVC limits will be enforced.
Related Questions in KUBERNETES
- Golang == Error: OCI runtime create failed: unable to start container process: exec: "./bin": stat ./bin: no such file or directory: unknown
- I can't create a pod in minikube on windows
- Oracle setting up on k8s cluster using helm charts enterprise edition
- Retrieve the Dockerfile configuration from the Kubernetes and also change container Java parameter?
- Summarize pods not running, by Namespace and Reason - I'm having trouble finding the reason
- How to get Java running parameters from Spring Boot running inside container in pod where no ps exist
- How do we configure prometheus server to scrape metrics from a pod with Istio sidecar proxy?
- In rke kube-proxy pod is not present
- problem with edge server registration in Eureka
- Unable to Access Kubernetes LoadBalancer Service from Local Device Outside Cluster
- Kubernetes cluster on GCE connection refused error
- Based on my experience, I've outlined the Kubernetes request flow. Could someone please add or highlight any points I might have overlooked?
- how to define StackGres helm chart "restapi" values to use internal LoadBalancer - AWS EKS
- Python3.11 can't open file [Errno 2] No such file or directory
- Cannot find remote pod service - SERVICE_UNAVAILABLE
Related Questions in KUBERNETES-PVC
- Multi attach error in AWS EKS deployment (rolling update)
- Kubernetes: I can't get my cronjob to mount a PersistentVolumeClaim
- PVC In pending state in eks
- The PersistentVolumeClaim is invalid Forbidden: spec is immutable after creation
- AKS - Cronjob use script file inside PVC
- Multi-Attach error for volume <pvcname> Volume is already exclusively attached to one node and can't be attached to another
- How are permissions determined for filesystems on the node, i.e., not mounted?
- initdb: error: directory "/var/lib/postgresql/data/pgdata" exists but is not empty
- persistent volume claim is unable to mount on the pod
- Kubernetes: How to map 2 different pods(statefulset) to one persistense volume?
- EFS content not showing
- Unable to mount GCP Filestore PVC to job pods
- How to replace dynamically provisioned PVCs for multi-replica StatefulSets
- PVC for helm hook jobs
- Kubernetes pod cannot attach to in-use volume
Related Questions in MICROK8S
- Kubernetes when pod limit reached, pod didn't terminate
- How do I set microk8s containerd.sock as runtime endpoint for crictl?
- Cannot use Kubernetes on Windows
- Connecting to MySQL db in microk8s cluster using workbench
- What is in helm's values.yaml equivalent of a k8s manifest's nfs-volume?
- Pull images from ECR using Kubelet credential provider is not working in Microk8s
- Observability addon problem? how to add new targets.?
- Odoo chat not working when deployed on baremetal microk8s
- Redis Sentinel doesn't failover when microk8s is stopped
- Persisent Volume permission erros in MicroK8s
- Django App not accessible on host machine when deployed on microk8s environment
- Microk8s ingress returning "not found" with nginx ingress
- How to configure microk8s with mayastor pools
- How to connect juju with microk8s cluster
- Portainer CE to BE upgrade failed, it's now in a CrashLoopBackOff state
Related Questions in KUBERNETES-METRICS
- How to get cluster statistics for more than 30 minutes in Kubernetes Dashboard?
- Why KSM (Kube-State-Metrics) is being scraped by only one Prometheus shard?
- Kubernetes - Horizontal Pod Scaler error, target "unknown". Message "no recommendation"
- Dask Kubernetes Operator can't reach apis/external.metrics.k8s.io/v1beta1
- How many GET/LIST Requests skip API Server Cache
- 'remote write receiver' HTTP API request in Prometheus
- Kubelet Rootfs.UsedBytes missing in /stats/summary in Minikube
- Kubernetes Rest API node CPU and RAM usage in percentage
- How to check number of cores and ram capacity left in kubernetes cluster
- relationship between container_memory_working_set_bytes and process_resident_memory_bytes and total_rss
- what is the meaning of 'window' in results from k8s metric server api
- Access Kubernetes Api from a Pod with Java-Client Library
- Microk8s Hostpath FS Usage of PVC
- Is it possible to use an autoscaling/v2beta2 HPA with apiregistration.k8s.io/v1 APIService?
- How to get network information from metrics server
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Since with
hostPathyour data is stored directly on the worker you won't be able to monitor the usage. UsinghostPathhas many drawbacks and while its good for testing it should not be used for some prod system. Keeping the data directly on the node is dangerous and in the case of node failure/replacement you will loose it. Other disadvantages are:Pods created from the same pod template may behave differently on different nodes because of different hostPath file/dir contents on those nodes
Files or directories created with HostPath on the host are only writable by root. Which means, you either need to run your container process as root or modify the file permissions on the host to be writable by non-root user, which may lead to security issues
hostPathvolumes should not be used with Statefulsets.As you already found out it would be good idea to move on from
hostPathtowards something else.