Skip to content

Instantly share code, notes, and snippets.

@axeal
Forked from superseb/kubelet-nodefs-imagefs.sh
Last active April 5, 2019 15:59
Show Gist options
  • Save axeal/6cc8d51ed5bc7e970b4c1dfe9f8da2d8 to your computer and use it in GitHub Desktop.
Save axeal/6cc8d51ed5bc7e970b4c1dfe9f8da2d8 to your computer and use it in GitHub Desktop.
Check kubelet nodefs/imagefs
#!/bin/bash
# nodefs
# OS with curl
curl -sLk --cacert /etc/kubernetes/ssl/kube-ca.pem --cert /etc/kubernetes/ssl/kube-node.pem --key /etc/kubernetes/ssl/kube-node-key.pem https://127.0.0.1:10250/stats/summary | jq '.node.fs'
df -B1 /
# RancherOS
docker run -v /opt/rke/etc/kubernetes/ssl:/etc/kubernetes/ssl:ro --net host appropriate/curl -sLk --cacert /etc/kubernetes/ssl/kube-ca.pem --cert /etc/kubernetes/ssl/kube-node.pem --key /etc/kubernetes/ssl/kube-node-key.pem https://127.0.0.1:10250/stats/summary | jq '.node.fs'
df /
# imagefs
# OS with curl
curl -sLk --cacert /etc/kubernetes/ssl/kube-ca.pem --cert /etc/kubernetes/ssl/kube-node.pem --key /etc/kubernetes/ssl/kube-node-key.pem https://127.0.0.1:10250/stats/summary | jq .node.runtime.imageFs
df -B1 $(docker info --format='{{.DockerRootDir}}')
# RancherOS
docker run -v /opt/rke/etc/kubernetes/ssl:/etc/kubernetes/ssl:ro --net host appropriate/curl -sLk --cacert /etc/kubernetes/ssl/kube-ca.pem --cert /etc/kubernetes/ssl/kube-node.pem --key /etc/kubernetes/ssl/kube-node-key.pem https://127.0.0.1:10250/stats/summary | jq .node.runtime.imageFs
df $(docker info --format='{{.DockerRootDir}}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment