bootc is the underlying technology that enables OS’s like bazzite, and Aurora from the uBlue ecosystem.
Posts tagged: containers
All posts with the tag "containers"
Hynek has a sick dockerfile setup for using uv in python projects.
Cluster API book
This page is gold. It lays out all of the distrobox assemble api with some good examples of how to get access to things like podman and kind from inside of containers.
Especially this example.
Today I learned that you can use init_hooks to access host machine commands from inside a distrobox container. This is super handy for things that you cannot get to from inside the container and need ran outside (docker, podman, flatpak, xdg-open).
After first setting up a new k3s instance your kubeconfig file will be located in /etc/rancher/k3s/k3s.yaml.
You cans use it from here by setting $KUBECONFIG to that file.
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
Or you can copy it to ~/.kube/config
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
If you have installed k3s on a remote server and need the config on your local machine then you will need to modify the server address to reflect the remote server.
...
Docker no Docker, what!!!
So fly.io uses Dockerfiles to deploy your app, but no docker. They use containerd to download your docker images into firecracker microvms to run your app. Firecracker is the same tech that runs aws lambda functions.
Fascinating short post on the beans under the hood at fly.io and how they scale your app globally.
I’ve started leaning in on kubernetes kustomize to customize my manifests per deployment per environment. Today I learned that it comes with a diff command.
kubectl diff -k k8s/overlays/local
You can enable color diffs by using an external diff provider like colordiff.
export KUBECTL_EXTERNAL_DIFF="colordiff -N -u"
You might need to install colordiff if you don’t already have it.
sudo pacman -S colordiff sudo apt install colordiff
Now I can try out kustomize changes and see the change with kustomize diff.
kubectl dash k
Kubernetes ships with a feature called kustomize that allows you to customize your manifests in a declarative way. It's a bit like helm, but easier to use. I...
Great intro into kustomize. This helped me get started with kustomize.
kind cluster
kind{.hoverlink} is a very useful tool to quickly standup and teardown kubernetes clusters. I use it to run clusters locally. Generally they are short lived clusters for trying, testing, and learning about kubernetes.
Kind is Kubernetes in Docker, its very fast to get a new cluster up and running. Other than checking a box in docker desktop it is the easiest way currently to get a cluster up and running. I’ve used docker desktop for k8s before I really developed on k8s and it was buggy at the time and sometimes started and sometimes didn’t, when it didnt I had no idea how to fix it. I’d suggest kind as the best option to get a cluster up and running locally.
If you are looking for a production ready cluster this is not it. I really like ...
Yesterday I realized that I have overlooked the default installation method of the sealed secrets controller for kubernetes kubeseal this whole time an jumped straight to the helm section. I spun up a quick kind cluster and had it up quickly. I can’t say this is any better or worse than helm as I have never needed to customize the install. According to the docs you can customize it with [[ kustomize ]] or helm.
Love how Daniel just brushed off the number of netflix tv installs as small beans for curl installs. overall great episode on open source, owning a major component to technology with such a small team.
A linter for linting kubernetes manifests and help charts.
Great listen for anyone interested in productionizing python code with docker. Itamar brings up some
Don’t trust base images for security, upgrade your packages. Vulnerabilties become published and solved giving the bad guys istructions how to wreck your day and these fixes wont come to your docker application for up to two weeks due to image build tatency.
For job based containers pre-compile your pyc for faster startup.
Alpine linux is probably not what you want for python. Many packages such as postgres ship pre-copiled binaries that work for most linux distributions wich use glibc, but alpine uses musl so the binaries will be incompatable requiring you to need to install a bunch of build dependencies.
podman requires qemu-system on
❯ podman machine init Looking up Podman Machine image at quay.io/podman/machine-os:5.1 to create VM Extracting compressed file: podman-machine-default-amd64.qcow2: done Error: exec: "qemu-img": executable file not found in $PATH
The fix to this for me was to install qemu-system before podman machine init.
Argo events is an event driven automation framework for kubernetes that can create kubernetes objects among other things based on events. I’ve been using native kubernetes cronjobs to kick off jobs based on a cron trigger.
For instance I am running reader.waylonwalker.com every hour, to rebuild the site and re-deploy it. It takes about two minutes to fetch every rss feed, so this is a nice application of a job compared to a web server fetching the feeds live. Now my posts may be up to an hour stale but they load fast.
Argo events takes event drien architecture to the next level allowing to be triggered by many more things, and do many more things than creating a cron job. I’m definitely thinking about dropping this in my homelab.
This is kinda sick, its a tool to clean up container images in a k8s cluster.
distrobox gives you distrobox-host-exec to run commands on the host. This is handy to get access to host level clis that you probably wouldn’t want to run from the container like podman, docker, flatpak.
DESCRIPTION distrobox-host-exec lets one execute command on the host, while inside of a container.
Under the hood, distrobox-host-exec uses host-spawn a project that lets us execute commands back on the host. If the tool is not found the user will be prompted to install it.
As of kubernetes 1.15 there is an easy way to restart all pods in a deployment.
kubectl -n {NAMESPACE} rollout restart deploy
Thanks Lane give him a follow @wagslane