Skip to main content

3 posts tagged with "kubernetes"

View All Tags

· 4 min read

uv is "an extremely fast Python package installer and resolver, written in Rust" from https://astral.sh. Recently, I have started using uv in my day-to-day Python workflows. After a few weeks of usage I am sold! uv will be my go-to package manager for Python projects moving forward. It is MUCH faster than pip and I really like the new workflow it provides me with uv pip compile and uv pip sync.

TL/DR

I am now using uv instead of pip for most of my projects. My workflow looks like this:

alias uvinit='uv venv && source .venv/bin/activate'
alias uvsync='uv pip compile requirements.in --quiet --output-file requirements.txt && uv pip sync requirements.txt'

uvinit
echo "pandas" > requirements.in
uvsync

· 2 min read

Over the past year I have dedicated a lot of time to learning Kubernetes. Here are the resources I have found most helpful!

Kubernetes Tutorial for Beginners (FULL COURSE in 4 Hours)

I would recommend starting with this video. After taking this four hour crash course you will have a basic understanding of how Kubernetes works, and you will have a Kubernetes cluster running on your computer you can use for further learning.

Kubernetes Fundamentals (LFS258)

This course is very comprehensive and will prepare you for the CKA Exam. I found this course to be my favourite resource. There are only two downsides:

  • It is expensive. The course alone costs $299 USD. The course and the CKA Exam cost $595 USD. (As of 2023-04-15). However, if you can afford it, I think putting a little bit of skin in the game is a good motivator to learn and take the course seriously.
  • The course also takes some time to complete. The course took me about 3 months to complete spending a few hours each weekend.

Kubernetes: Up and Running

This book is a good reference and will be nice resource to have in the future. However, it is also a bit pricey.

· One min read

One common task in Kubernetes is to exec into a pod to run commands. The typical way to do this is as follows:

POD_NAME="test-pod-1234asdfas"
kubectl exec -it pod/$POD_NAME -- /bin/bash

This pattern typically works fine. However, if you are frequently creating and deleting new pods, the name will constantly change. This means you will have to retype the command with the new pod name instead of just using the up arrow to select a recent command. A more consistent way is to use the deployment name instead:

DEPLOYMENT_NAME="test-pod"
kubectl exec -it deployment/$DEPLOYMENT_NAME -- /bin/bash