GCP K8S Notes – check logs

@cloudshell:~/kubernetes-engine-samples/php-test $ ls --recursive
.:
Dockerfile src

./src:
conf html

./src/conf:
php.ini

./src/html:
index.php

@cloudshell:~/kubernetes-engine-samples/php-test $ kubectl get po,svc -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/cd-jenkins-0 2/2 Running 0 3h2m 10.68.0.5 gke-test-k8s-cluster-default-pool-280580a6-94ht
pod/php-test-deploy-7fd75b6b4f-t9v2z 1/1 Running 0 5m58s 10.68.0.6 gke-test-k8s-cluster-default-pool-280580a6-94ht

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/cd-jenkins ClusterIP 10.72.0.118 8080/TCP 3h2m app.kubernetes.io/component=jenkins-controller,app.kubernetes.io/instance=cd-jenkins
service/cd-jenkins-agent ClusterIP 10.72.12.243 50000/TCP 3h2m app.kubernetes.io/component=jenkins-controller,app.kubernetes.io/instance=cd-jenkins
service/kubernetes ClusterIP 10.72.0.1 443/TCP 3h53m
service/php-service-svc LoadBalancer 10.72.0.137 35.229.218.70 80:30808/TCP 3m37s app=php-test

@cloudshell:~/kubernetes-engine-samples/php-test $ kubectl get pods
NAME READY STATUS RESTARTS AGE
cd-jenkins-0 2/2 Running 0 3h7m
php-test-deploy-7fd75b6b4f-t9v2z 1/1 Running 0 11m

@cloudshell:~/kubernetes-engine-samples/php-test $ kubectl logs php-test-deploy-7fd75b6b4f-t9v2z
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.68.0.6. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.68.0.6. Set the 'ServerName' directive globally to suppress this message
[Sun Oct 16 14:41:37.494856 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.2.34 configured -- resuming normal operations
[Sun Oct 16 14:41:37.495057 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
[Sun Oct 16 14:47:31.480590 2022] [php7:notice] [pid 19] [client 10.68.0.1:7222] {"HTTP_HOST":"35.229.218.70","HTTP_CONNECTION":"keep-alive","HTTP_UPGRADE_INSECURE_REQUESTS":"1","HTTP_USER_AGENT":"Mozilla\\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/106.0.0.0 Safari\\/537.36","HTTP_ACCEPT":"text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/avif,image\\/webp,image\\/apng,*\\/*;q=0.8","HTTP_SEC_GPC":"1","HTTP_ACCEPT_LANGUAGE":"zh-TW,zh","HTTP_ACCEPT_ENCODING":"gzip, deflate","PATH":"\\/usr\\/local\\/sbin:\\/usr\\/local\\/bin:\\/usr\\/sbin:\\/usr\\/bin:\\/sbin:\\/bin","SERVER_SIGNATURE":"
Apache\\/2.4.38 (Debian) Server at 35.229.218.70 Port 80<\\/address>\\n","SERVER_SOFTWARE":"Apache\\/2.4.38 (Debian)","SERVER_NAME":"35.229.218.70","SERVER_ADDR":"10.68.0.6","SERVER_PORT":"80","REMOTE_ADDR":"10.68.0.1","DOCUMENT_ROOT":"\\/var\\/www\\/html","REQUEST_SCHEME":"http","CONTEXT_PREFIX":"","CONTEXT_DOCUMENT_ROOT":"\\/var\\/www\\/html","SERVER_ADMIN":"webmaster@localhost","SCRIPT_FILENAME":"\\/var\\/www\\/html\\/index.php","REMOTE_PORT":"7222","GATEWAY_INTERFACE":"CGI\\/1.1","SERVER_PROTOCOL":"HTTP\\/1.1","REQUEST_METHOD":"GET","QUERY_STRING":"","REQUEST_URI":"\\/","SCRIPT_NAME":"\\/index.php","PHP_SELF":"\\/index.php","REQUEST_TIME_FLOAT":1665931651.479,"REQUEST_TIME":1665931651,"argv":[],"argc":0} 10.68.0.1 - - [16/Oct/2022:14:47:31 +0000] "GET / HTTP/1.1" 200 1110 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" 10.68.0.1 - - [16/Oct/2022:14:47:31 +0000] "GET /favicon.ico HTTP/1.1" 404 491 "http://35.229.218.70/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" [Sun Oct 16 14:48:14.881361 2022] [php7:notice] [pid 20] [client 10.68.0.1:55307] {"HTTP_HOST":"35.229.218.70","HTTP_CONNECTION":"keep-alive","HTTP_CACHE_CONTROL":"max-age=0","HTTP_UPGRADE_INSECURE_REQUESTS":"1","HTTP_USER_AGENT":"Mozilla\\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/106.0.0.0 Safari\\/537.36","HTTP_ACCEPT":"text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/avif,image\\/webp,image\\/apng,*\\/*;q=0.8","HTTP_SEC_GPC":"1","HTTP_ACCEPT_LANGUAGE":"zh-TW,zh","HTTP_ACCEPT_ENCODING":"gzip, deflate","PATH":"\\/usr\\/local\\/sbin:\\/usr\\/local\\/bin:\\/usr\\/sbin:\\/usr\\/bin:\\/sbin:\\/bin","SERVER_SIGNATURE":"
Apache\\/2.4.38 (Debian) Server at 35.229.218.70 Port 80<\\/address>\\n","SERVER_SOFTWARE":"Apache\\/2.4.38 (Debian)","SERVER_NAME":"35.229.218.70","SERVER_ADDR":"10.68.0.6","SERVER_PORT":"80","REMOTE_ADDR":"10.68.0.1","DOCUMENT_ROOT":"\\/var\\/www\\/html","REQUEST_SCHEME