k8s 获取 pod 信息

文章展示了在Kubernetes环境中对名为glusterfs-d5mfx的Pod进行管理的命令,该Pod属于GlusterFSDaemonSet。此外,还提到了与Pod关联的cgroup信息,位于kubepods-besteffort的存储层级中,这与资源管理和监控有关。
摘要由CSDN通过智能技术生成
[root@k8s-master-01 flink-server-deployment]# kubectl get po -o json glusterfs-d5mfx
{
    "apiVersion": "v1",
    "kind": "Pod",
    "metadata": {
        "creationTimestamp": "2023-03-08T02:44:31Z",
        "generateName": "glusterfs-",
        "labels": {
            "controller-revision-hash": "6fb965b478",
            "glusterfs-node": "daemonset",
            "pod-template-generation": "3"
        },
        "name": "glusterfs-d5mfx",
        "namespace": "default",
        "ownerReferences": [
            {
                "apiVersion": "apps/v1",
                "blockOwnerDeletion": true,
                "controller": true,
                "kind": "DaemonSet",
                "name": "glusterfs",
                "uid": "05b8e8ec-6950-440b-a7c8-af6684143cf6"
            }
        ],
        "resourceVersion": "50837571",
        "selfLink": "/api/v1/namespaces/default/pods/glusterfs-d5mfx",
        "uid": "dc26d890-a886-463b-ba43-d6dc32dca973"
    },

在这里插入图片描述

metadata.uid pod id

[root@k8s-storage-02 kubepods-besteffort.slice]# pwd
/sys/fs/cgroup/systemd/kubepods.slice/kubepods-besteffort.slice
[root@k8s-storage-02 kubepods-besteffort.slice]# ll
total 0
-rw-r--r-- 1 root root 0 Feb 17 22:28 cgroup.clone_children
--w--w--w- 1 root root 0 Feb 17 22:28 cgroup.event_control
-rw-r--r-- 1 root root 0 Feb 17 22:28 cgroup.procs
...
drwxr-xr-x 4 root root 0 Mar  8 10:44 kubepods-besteffort-poddc26d890_a886_463b_ba43_d6dc32dca973.slice
...
-rw-r--r-- 1 root root 0 Feb 17 22:28 notify_on_release
-rw-r--r-- 1 root root 0 Feb 17 22:28 tasks

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值