time-printer
is a simple application that has two goals -
- It shows a pod with more than one container in it
- it illustrates how to use a shared volumes between containers
To run time-printer
in our cluster -
$ kubectl create -f timeprinter.yaml
This loads te yaml manifest file to the APi server which validates it, stores it in etcd
and starts the process of running the pod in the clsuter.
The get the state of the pod, we can again run
$ kubectl get pods
To see the logs of the pod, run
$ kubectl logs <pod-name>
and use the -c
flag to get the logs from a specific container in the pod