K8s

oomkill-watch - A tool to watch OOMKilled events in k8s

2024-05-03

I recently uploaded a tool to GitHub that wraps the kubectl get events -w command for watching OOMKilled events in Kubernetes. It’s called oomkill-watch. You can check out the code here. You might find this useful.

Events · Golang · K8s · Kubectl · Oomkilled · Tech · Watch

1 minute

Attempt to replace hedge’s member tracking with hashicorp/memberlist

2023-04-28

I recently came across the hashicorp/memberlist library while browsing GitHub and I thought it would be a good replacement for hedge’s internal member tracking logic. It seems to be widely used (thus more battle-tested) as well. I was quite excited as I always thought that hedge’s equivalent logic is too barebones and untested outside of our use cases. It works just fine for its current intended purpose but I’ve been hesitating to build on top of it until I can really say that it’s stable enough.

Distributed-Computing · Hedge · K8s · Kubernetes · Memberlist · Tech

2 minutes

An automation-friendly, highly-scalable, and scriptable testing tool

2020-10-31

I uploaded an automation-friendly, highly-scalable, and scriptable API/generic testing tool built to run on Kubernetes. It’s called oops and you can find the code here. Maybe it will be useful to anybody out there.

Api · K8s · Kubernetes · Testing

1 minute

Automate Spanner backup using Kubernetes CronJob

2020-09-11

As of this writing, GCP doesn’t have an option to create Spanner backups automatically. This could be available when you’re reading this in the future. At the moment, however, if you’re using Kubernetes, you can utilize CronJob to do a scheduled backup. Here’s a sample CronJob deployment that uses gcloud to create the backups. First, you need to create a service account that has permissions to create Spanner backups. Once you have downloaded the JSON file for the service account, store it as a Kubernetes Secret.

Backup · Cronjob · Gcp · K8s · Spanner

2 minutes

dlock - package for distributed locks

2020-07-08

I’ve uploaded a package for distributed locks. It’s called dlock. At the moment, it supports using Kubernetes’ LeaseLock object and Redis. You might find it useful.

Distributed-Locks · K8s · K8slock · Leaselock · Redis · Redislock

1 minute

Update to kubepfm, a kubectl port-forward wrapper for multiple pods

2020-01-27

Updated 2020/01/27: Support for forwarding to deployments and services Original post: I recently uploaded a tool to GitHub that wraps kubectl port-forward command and supports port-forwarding to multiple pods. It’s called kubepfm. I use this tool heavily in my development work. You can check out the code here. You might find this useful.

K8s · Kubectl · Kubepfm · Kubernetes · Port-Forward

1 minute

Extending the timeout of a Kubernetes service in GCP

2019-11-28

This is related to a previous post about Kubernetes services. This time, it’s about extending the timeout of an Ingress. We had a situation where we had to download a huge file from one of our exposed services. The download takes about two minutes to complete. This didn’t really worked out since by default, GCP load balancers that are associated with k8s Ingresses have a timeout value of 30s. For a time, we just did manual updates by going to the GCP k8s Services and Ingress console, opening the backend service under the Ingress, and editing the Timeout section to the desired seconds.

Gcp · Ingress · K8s · Timeout

1 minute

Using stern together with grep

2019-09-30

I’ve been using stern as my goto log viewer for Kubernetes. It supports multiple pods and other convenient functions on top of kubectl logs. And of course, grepping goes hand in hand with log viewing, doesn’t it? To combine grep with stern, I use the following commands: For OSX: # stern <some-prod-prefix> | grep -i –line-buffered -E '<extended-regex>' $ stern user | grep -i –line-buffered -E 'failed' # For Linux (Ubuntu specifically): # stern <some-prod-prefix> | grep -i -E '<extended-regex>' $ stern user -s 1h | grep -i -E 'error'

Grep · K8s · Logs · Stern

1 minute

Update to kubepfm, a kubectl port-forward wrapper for multiple pods

2019-02-20

Updated 2019/02/20: Support for namespaces https://github.com/flowerinthenight/kubepfm/issues/1 Improved handling of input patterns Original post: I recently uploaded a tool to GitHub that wraps kubectl port-forward command and supports port-forwarding to multiple pods. It’s called kubepfm. I use this tool heavily in my development work. You can check out the code here. You might find this useful.

K8s · Kubectl · Kubepfm · Kubernetes · Port-Forward

1 minute

Mobingi’s Kubernetes clusters repo

2018-12-27

I posted an article for @mobingi about its Kubernetes clusters repo. Please check it out. Thanks.

Go · K8s · Kubernetes · Mobingi · Repo

1 minute

kubepfm, a kubectl port-forward wrapper for multiple pods

2018-07-24

I recently uploaded a tool to GitHub that wraps kubectl port-forward command and supports port-forwarding to multiple pods. It’s called kubepfm. I use this tool heavily in my development work. You can check out the code here. You might find this useful.

K8s · Kubectl · Kubepfm · Kubernetes · Port-Forward

1 minute