Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 713 Bytes

kubectl.md

File metadata and controls

30 lines (20 loc) · 713 Bytes
description tags
View logs from the command line using kubectl.
guide
kubectl

View logs from the command line

This guide will show you how to view logs from the command line using kubectl.

0. Prerequisites

  • You have installed the kubectl command-line tool.
  • You have access to the team where the application is running.

1. Find the pod name

You can view logs for a specific pod. First, you need to find the name of the pod you want to view logs for.

List all pods in the namespace:

kubectl get pods -n <namespace>

2. View logs

View logs for a specific pod:

kubectl logs <pod-name> -n <namespace>