-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathkubernetes_logs.yaml
38 lines (31 loc) · 2.22 KB
/
kubernetes_logs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
toolsets:
kubernetes/logs:
description: "Read pod logs"
docs_url: "https://kubernetes.io/docs/home/"
icon_url: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRPKA-U9m5BxYQDF1O7atMfj9EMMXEoGu4t0Q&s"
tags:
- core
prerequisites:
- command: "kubectl version --client"
tools:
- name: "kubectl_previous_logs"
description: "Run `kubectl logs --previous` on a single Kubernetes pod. Used to fetch logs for a pod that crashed and see logs from before the crash. Never give a deployment name or a resource that is not a pod."
command: "kubectl logs {{ name}} -n {{ namespace }} --previous"
- name: "kubectl_previous_logs_all_containers"
description: "Run `kubectl logs --previous` on a single Kubernetes pod. Used to fetch logs for a pod that crashed and see logs from before the crash."
command: "kubectl logs {{pod_name}} -n {{ namespace }} --previous --all-containers"
- name: "kubectl_container_previous_logs"
description: "Run `kubectl logs --previous` on a single container of a Kubernetes pod. Used to fetch logs for a pod that crashed and see logs from before the crash."
command: "kubectl logs {{pod_name}} -c {{container_name}} -n {{ namespace }} --previous"
- name: "kubectl_logs"
description: "Run `kubectl logs` on a single Kubernetes pod. Never give a deployment name or a resource that is not a pod."
command: "kubectl logs {{name}} -n {{ namespace }}"
- name: "kubectl_logs_all_containers"
description: "Run `kubectl logs` on all containers within a single Kubernetes pod."
command: "kubectl logs {{pod_name}} -n {{ namespace }} --all-containers"
- name: "kubectl_container_logs"
description: "Run `kubectl logs` on a single container within a Kubernetes pod. This is to get the logs of a specific container in a multi-container pod."
command: "kubectl logs {{pod_name}} -c {{container_name}} -n {{ namespace }} "
- name: "kubectl_logs_grep"
description: "Search for a specific term in the logs of a single Kubernetes pod. Only provide a pod name, not a deployment or other resource."
command: "kubectl logs {{ name }} -n {{ namespace }} | grep {{ search_term }}"