GKE list tainted nodepools with a specific taint

A use case for upgrades involved being able to list all the node pools that have scaled down back to 0 and have a specific taint. This blog post shows the commands you can use to get this information.

List the GKE nodepools that have been tainted with key=upgrade …

Continue reading »

3 tips for GKE ML/batch workloads

There has been an influx of large batch and ML training workloads on GKE. I've personally had the please of working with one of those workloads. The things that batch and ML workload often require from GKE are the following:

  • Minimize pod disruptions since pods often can't simply be restarted …

Continue reading »

GKE Safely Drain a Nodepool without pod disruptions

GKE/K8s wasn't originally designed for workloads that spin up single pods and want those pods to stay up and running on the same node for very time. That doesn't mean those kind of workloads aren't running on GKE. In fact, there are large GKE ML/batch platform workloads running …

Continue reading »

Removing sidebar from storefront theme

By default, storefront comes with a large sidebar that isn't really useful for ecommerce websites. This post shows you how to remove the sidebar by creating a functions.php file in your storefront child theme.

See my previous post on creating a storefront child theme if you don't have a …

Continue reading »

Creating a woocommerce storefront child theme

The free storefront theme has a lot of features but it doesn't look great by default. Luckily, it's quite easy to create a child theme to make it more attractive. For example, using a child theme you can remove the sidebar and remove the footer credits. This blog post will …

Continue reading »

Find files with ack and replace string with sed

ack is a nice to tool to search in files in your current directory and subdirectores, but ack won't do search and replace. Luckily, we can easily combine ack and sed using xargs.

ack -l "app.kubernetes.io/name: myapp" | xargs sed -i 's|app.kubernetes.io/name: myapp|app …

Continue reading »

Python Create UUID from random string of words

Context: I'm loading data from one database (A) to another database (Weaviate). Weaviate only supports UUID, however database A is using strings as the primary identifier for some tables.

Problem: In order to not duplicate data I need to ensure that the string identifier gets converted to an UUID in …

Continue reading »

Deploying a Weaviate cluster on GKE

Weaviate has great docs on how to deploy on K8s using Helm, however this guide is specifically focused on an end-to-end deployment of Weaviate on GKE with replication turned on. The following topics will be covered:

  • Creating and configuring your GKE cluster
  • Deploying Weaviate with Helm
  • Tweaking the Weaviate helm …

Continue reading »

Python Create UUID from integer

Code:

import uuid
my_uuid = uuid.UUID(int=1)
print(my_uuid)

That should show the following string:

00000000-0000-0000-0000-000000000001

You can also convert back to integer by doing:

my_uuid.int()

For my use case this was needed because my source database has integer based IDs, however the destination …

Continue reading »

Preventing Privileged pods using Pod Security Admission / Standards

In a Kubernetes cluster, a privileged pod is a pod that has been given extended permissions beyond the default set of permissions. These extended permissions can include the ability to access the host's network, devices, and other sensitive resources. While privileged pods can be useful in certain situations, they also …

Continue reading »