May 2018
Intermediate to advanced
554 pages
13h 51m
English
In order to demonstrate Stackdriver with GKE, we will create one namespace on Kubernetes, then launch a sample Pod to see some logs on the Stackdriver, as shown in the following steps:
$ kubectl create namespace chap9namespace "chap9" created
$ cat myapp.yaml apiVersion: v1kind: Podmetadata: name: myappspec: containers: - image: busybox name: application args: - /bin/sh - -c - > while true; do echo "$(date) INFO hello"; sleep 1; done
$ kubectl create -f myapp.yaml --namespace=chap9pod "myapp" created