Change GKE Container Timezone

By default GKE Cluster with container image is using UTC+0 timezone, to change the timezone we need to use k8tz installed to the cluster. You can check the details of k8tz on their github page here https://github.com/k8tz/k8tz This example use GKE Private cluster with Access control plane using its external IP address enable. First open Cloud Shell. Check cloud shell external IP address using this command bash dig +short myip.opendns.com @resolver1.
Read more →

Adding entries to Pod /etc/hosts with HostAliases

To add host to /etc/hosts file inside the container, you can define the hosts aliases inside your deployment yaml file. For example like the following yaml file: yaml apiVersion : apps/v1 kind: Deployment metadata: name: "backend-cluster" spec: replicas: 1 selector: matchLabels: app: "backend" template: metadata: labels: app: "backend" spec: containers: - name: "backend" image: "exampleregistry.gcr.io/backend" ports: - containerPort: 80 hostAliases: - hostnames: - "www.example.com" ip: "10.0.2.4" The important part is hostAliases:
Read more →