Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: extra info for pods like restart reason and time #232

Closed
si458 opened this issue Oct 17, 2020 · 1 comment
Closed

Feature Request: extra info for pods like restart reason and time #232

si458 opened this issue Oct 17, 2020 · 1 comment

Comments

@si458
Copy link
Contributor

si458 commented Oct 17, 2020

it would be amazing if we could see extra information in the pods section about a pod

i currently have an issue where a pod becomes unusable (due to hardware issue)
so i created a script inside it to killall if unusable then kubernetes will restart the pod itself

but using kubectl describe pod PODNAME -n NAMESPACE shows i can get extra information including reason for restart and time etc

sample below of extra information that is usable

Simon@SiMacBookPro ~ % kubectl describe pod longhorn-csi-plugin-gvwbc -n longhorn-system         
Name:         longhorn-csi-plugin-gvwbc
Namespace:    longhorn-system
Priority:     0
Node:         k8s-master/192.168.168.136
Start Time:   Sat, 12 Sep 2020 16:03:26 +0100
Labels:       app=longhorn-csi-plugin
              controller-revision-hash=6694789b49
              pod-template-generation=1
Annotations:  <none>
Status:       Running
IP:           10.42.0.110
IPs:
  IP:           10.42.0.110
Controlled By:  DaemonSet/longhorn-csi-plugin
Containers:
  node-driver-registrar:
    Container ID:  containerd://e7ae8946f82682e59c3d08d003e30db4a49b4e642b807a018154ab2d9a051d8d
    Image:         longhornio/csi-node-driver-registrar:v1.2.0
    Image ID:      docker.io/longhornio/csi-node-driver-registrar@sha256:273175c272162d480d06849e09e6e3cdb0245239e3a82df6630df3bc059c6571
    Port:          <none>
    Host Port:     <none>
    Args:
      --v=5
      --csi-address=$(ADDRESS)
      --kubelet-registration-path=/var/lib/kubelet/obsoleted-longhorn-plugins/driver.longhorn.io/csi.sock
    State:          Running
      Started:      Tue, 22 Sep 2020 13:57:22 +0100
    Last State:     Terminated
      Reason:       Unknown
      Exit Code:    255
      Started:      Sat, 12 Sep 2020 16:03:30 +0100
      Finished:     Tue, 22 Sep 2020 13:57:15 +0100
    Ready:          True
    Restart Count:  1
    Environment:
      ADDRESS:  /csi/csi.sock
    Mounts:
      /csi/ from socket-dir (rw)
      /registration from registration-dir (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from longhorn-service-account-token-gsq4r (ro)
  longhorn-csi-plugin:
    Container ID:  containerd://3b8f32932ee20fb8bf285f60986d761f1d2753df8657b76bd69f0ff40522e21f
    Image:         longhornio/longhorn-manager:v1.0.2
    Image ID:      docker.io/longhornio/longhorn-manager@sha256:a0ef6144f543000ff7c6ca2a7aa095e788467fe5e1aafc3f774fbfde752a7042
    Port:          <none>
    Host Port:     <none>
    Args:
      longhorn-manager
      -d
      csi
      --nodeid=$(NODE_ID)
      --endpoint=$(CSI_ENDPOINT)
      --drivername=driver.longhorn.io
      --manager-url=http://longhorn-backend:9500/v1
    State:          Running
      Started:      Tue, 22 Sep 2020 13:57:55 +0100
    Last State:     Terminated
      Reason:       Error
      Exit Code:    1
      Started:      Tue, 22 Sep 2020 13:57:27 +0100
      Finished:     Tue, 22 Sep 2020 13:57:37 +0100
    Ready:          True
    Restart Count:  2
    Environment:
      NODE_ID:        (v1:spec.nodeName)
      CSI_ENDPOINT:  unix:///csi/csi.sock
    Mounts:
      /csi/ from socket-dir (rw)
      /dev from host-dev (rw)
      /lib/modules from lib-modules (ro)
      /sys from host-sys (rw)
      /var/lib/kubelet/plugins/kubernetes.io/csi from kubernetes-csi-dir (rw)
      /var/lib/kubelet/pods from pods-mount-dir (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from longhorn-service-account-token-gsq4r (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             True 
  ContainersReady   True 
  PodScheduled      True 
Volumes:
  kubernetes-csi-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/plugins/kubernetes.io/csi
    HostPathType:  DirectoryOrCreate
  registration-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/plugins_registry
    HostPathType:  Directory
  socket-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/obsoleted-longhorn-plugins/driver.longhorn.io
    HostPathType:  DirectoryOrCreate
  pods-mount-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/pods
    HostPathType:  DirectoryOrCreate
  host-dev:
    Type:          HostPath (bare host directory volume)
    Path:          /dev
    HostPathType:  
  host-sys:
    Type:          HostPath (bare host directory volume)
    Path:          /sys
    HostPathType:  
  lib-modules:
    Type:          HostPath (bare host directory volume)
    Path:          /lib/modules
    HostPathType:  
  longhorn-service-account-token-gsq4r:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  longhorn-service-account-token-gsq4r
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/disk-pressure:NoSchedule op=Exists
                 node.kubernetes.io/memory-pressure:NoSchedule op=Exists
                 node.kubernetes.io/not-ready:NoExecute op=Exists
                 node.kubernetes.io/pid-pressure:NoSchedule op=Exists
                 node.kubernetes.io/unreachable:NoExecute op=Exists
                 node.kubernetes.io/unschedulable:NoSchedule op=Exists
Events:          <none>
@si458 si458 changed the title Feature Request: extra info for pods Feature Request: extra info for pods like restart reason and time Oct 17, 2020
@si458
Copy link
Contributor Author

si458 commented Oct 17, 2020

IGNORE, found this information by clicking the pod name, haha! 👍

@si458 si458 closed this as completed Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant