Learn Kubernetes: Access to the logs
In this series of stories, you will learn how to use Kubernetes. Today, let’s see how to access to the logs of Pods.
The Kubernetes log provides access to the output of containers in a pod. Some services allow you to centralize all pods from all nodes.
Create a Pod resource file mylogs.yaml
running a container display a log :
apiVersion: v1
kind: Pod
metadata:
name: mylogs
spec:
containers:
- name: mycontainer
image: alpine
command:
- "sh"
- "-c"
- "while true; do echo $(date); sleep…