version 1 steps:- name: ‘bash’ args: [‘echo’, ‘I am running a bash command’] version 2 steps: – name: ‘gcr.io/cloud-builders/gcloud’ – entrypoint: ‘bash’ – args: – ‘-eEuo’ – ‘pipefail’ – ‘-c’ – |- if (( $(date ‘+%-e’) % 2 )); then echo “today is an odd day” else echo “today is an odd day, with an even number” fi – name:…
Tag: kubernetes
Liveness vs Readiness Health Checks in Application
The liveness check finds if the application is alive or not. The application defines the logic and the liveness check verifies the expected output. A webserver liveness check could include an HTTP handler that returns a fixed response or checks application dependencies. Sample Liveness check send a pong response in the handler combine health check of all dependencies and return…
Kubernetes: Adding A New Cluster Context
Visit the Google Cloud Console and navigate to clusters https://console.cloud.google.com/kubernetes/list Here you will see all of your clusters. Next, add a cluster to your kubectl context. $ gcloud container clusters get-credentials –project my-project <cluster name> –region <cluster region> Done!
Bringing a Pod Down in Kubernetes
Make Replicas Zero to Pause/Stop a Pod $ kubectl scale –replicas=0 deployment/<service name> -n staging deployment.extensions/<service name> scaled It’s useful to test a bringdown status of a service. References StackOverflow
Kubernetes for Dummies: StatefulSet
Kubernetes provides virtualized infrastructure components such as storage, compute and network. Imagine an operating system that allows users to allocate resources and run their applications. StatefulSet is a type of application that needs to persist information across lifetimes 🙂 The storage is exposed as a class and name. Storage class mimic real world and has meta information such as size,…