Basic setups for working with Kubernetes

When working with kubernetes (maybe in a CKA exam), you work with terminal most of the time. Configuring the environment properly is vital to save you time. Here are things I do first when entering a new environment (Kubernetes Playground | Katacoda, for example). Enable bash completion Honestly, I don’t use this much. However, occasionally, … Read more

Affinity and Antiaffinity in Kubernetes simplified

Studying Affinity and AntiAffinity can be challenging due to the length of the official documentation. This post is not intended to replace the official docs but to provide a bird’s-eye view of the structure. Some takeaways: affinity is a sub section of pod’s spec The diagram as follow: The full diagram as follow: Please ignore … Read more

Creating Kubernetes Replication Controller in 5 Minutes

Let’s look at the following diagram to create Kubernetes Replication Controller: What to remember when creating ReplicationController apiVersion: v1 You can define number of replicas, selector and template under spec spec->template has its own spec section along side metadata You specify containers’ related attributes under template‘s spec Create ReplicationController YAML file example Đạt TrầnI build … Read more

PostgreSQL Docker client-only Image

Update 2025 Please check out the new client here that supports a wide range of PostgreSQL version: https://hub.docker.com/r/dattm24/postgresql-client if you want to customize, here is the repo: https://github.com/datmt/docker-clients/tree/main/postgresql-client Recently I had to write a bash script to truncate all tables on a test database server. Using PgAdmin is a real pain since I have a … Read more