- Take me to Video Tutorial
In this section, we will take a look at managing application logs
apiVersion: v1
kind: Pod
metadata:
name: event-simulator-pod
spec:
containers:
- name: event-simulator
image: kodekloud/event-simulator
-
To view the logs
$ kubectl logs -f event-simulator-pod
-
If there are multiple containers in a pod then you must specify the name of the container explicitly in the command.
$ kubectl logs -f <pod-name> <container-name> $ kubeclt logs -f even-simulator-pod event-simulator