惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
C
CERT Recently Published Vulnerability Notes
阮一峰的网络日志
阮一峰的网络日志
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy International News Feed
N
News and Events Feed by Topic
博客园 - Franky
Spread Privacy
Spread Privacy
P
Privacy & Cybersecurity Law Blog
T
Tor Project blog
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
P
Proofpoint News Feed
博客园 - 叶小钗
S
Securelist
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
Vulnerabilities – Threatpost
量子位
D
Docker
NISL@THU
NISL@THU
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Engineering at Meta
Engineering at Meta
小众软件
小众软件
F
Fortinet All Blogs
Cisco Talos Blog
Cisco Talos Blog
N
News | PayPal Newsroom
F
Full Disclosure
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
B
Blog RSS Feed
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
H
Heimdal Security Blog
L
Lohrmann on Cybersecurity
IT之家
IT之家
Webroot Blog
Webroot Blog
P
Palo Alto Networks Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cloudbric
Cloudbric
Blog — PlanetScale
Blog — PlanetScale

Ivan on Containers, Kubernetes, and Server-Side

A grounded take on agentic coding for production environments Server-Side Playgrounds Reimagined: Build, Boot, and Network Your Own Virtual Labs [not a] Kubernetes 101 - Pods, Deployments, and Services As an Attempt To Automate Age-Old Infra Patterns JavaScript or TypeScript? How To Benefit From the Dichotomy On Software Design... and Good Writing Building a Firecracker-Powered Course Platform To Learn Docker and Kubernetes How To Publish a Port of a Running Container What Actually Happens When You Publish a Container Port A Visual Guide to SSH Tunnels: Local and Remote Port Forwarding Debugging Containers Like a Pro Docker: How To Debug Distroless And Slim Containers How To Extract Container Image Filesystem Using Docker | iximiuz Labs In Pursuit of Better Container Images: Alpine, Distroless, Apko, Chisel, DockerSlim, oh my! How To Start Programming In Go: Advice For Fellow DevOps Engineers Kubernetes Ephemeral Containers and kubectl debug Command How To Develop Kubernetes CLIs Like a Pro Docker Container Commands Explained: Understand, Don't Memorize | iximiuz Labs Learning Docker with Docker - Toying With DinD For Fun And Profit How To Extend Kubernetes API - Kubernetes vs. Django The Influence of Plumbing on Programming How To Call Kubernetes API from Go - Types and Common Machinery How To Call Kubernetes API using Simple HTTP Client Kubernetes API Basics - Resources, Kinds, and Objects OpenFaaS - Run Containerized Functions On Your Own Terms Learning Containers From The Bottom Up Docker Containers vs. Kubernetes Pods - Taking a Deeper Look | iximiuz Labs Learn-by-Doing Platforms for Dev, DevOps, and SRE Folks How HTTP Keep-Alive can cause TCP race condition How to Work with Container Images Using ctr | iximiuz Labs Multiple Containers, Same Port, no Reverse Proxy... Exploring Go net/http Package - On How Not To Set Socket Options Disposable Local Development Environments with Vagrant, Docker, and Arkade DevOps, SRE, and Platform Engineering My Choice of Programming Languages Prometheus Is Not a TSDB How to learn PromQL with Prometheus Playground Prometheus Cheat Sheet - Basics (Metrics, Labels, Time Series, Scraping) Rust - Writing Parsers With nom Parser Combinator Framework pq - parse and query log files as time series Prometheus Cheat Sheet - Moving Average, Max, Min, etc (Aggregation Over Time) Prometheus Cheat Sheet - How to Join Multiple Metrics (Vector Matching) The Need For Slimmer Containers Understanding Rust Privacy and Visibility Model Bridge vs. Switch: Takeaways from a Real Data Center Tour | iximiuz Labs From LAN to VXLAN: Networking Basics for Non-Network Engineers | iximiuz Labs KiND - How I Wasted a Day Loading Local Docker Images Go, HTTP handlers, panic, and deadlocks Exploring Kubernetes Operator Pattern Making Sense Out Of Cloud Native Buzz Service Discovery in Kubernetes: Combining the Best of Two Worlds API Developers Never REST How Container Networking Works: Building a Bridge Network From Scratch | iximiuz Labs Traefik: canary deployments with weighted load balancing Service Proxy, Pod, Sidecar, oh my! You Need Containers To Build Images You Don't Need an Image To Run a Container Not Every Container Has an Operating System Inside Working with container images in Go Implementing Container Runtime Shim: Interactive Containers How to use Flask with gevent (uWSGI and Gunicorn editions) My 10 Years of Programming Experience Implementing Container Runtime Shim: First Code Implementing Container Runtime Shim: runc Kubernetes Repository On Flame Dealing with process termination in Linux (with Rust examples) conman - [the] Container Manager: Inception Journey From Containerization To Orchestration And Beyond Linux PTY - How docker attach and docker exec Commands Work Inside Illustrated introduction to Linux iptables From Docker Container to Bootable Linux Disk Image Пишем свой веб-сервер на Python: протокол HTTP 9001 способ создать веб-сервер на Python Explaining async/await in 200 lines of code Explaining event loop in 100 lines of code Save the day with gevent Пишем свой веб-сервер на Python: процессы, потоки и асинхронный I/O Truly optional scalar types in protobuf3 (with Go examples) Node.js Writable streams distilled Node.js Readable streams distilled How to on starting processes (mostly in Linux) Дайджест интересных ссылок – Июль 2016 Пишем свой веб-сервер на Python: сокеты Наследование в JavaScript Мастерить!
Master Go While Learning Containers
Ivan Velichko · 2020-02-03 · via Ivan on Containers, Kubernetes, and Server-Side

I spent half a year deep-diving into the world of containers and their orchestration. I have been enjoying it very much and learned a lot. On my journey, I need to tackle lots of interesting and specific concepts. But there is one commonality almost every project in this area possesses. When it comes to containers - the Go programming language is ubiquitous!

Level up your server-side game — join 20,000 engineers getting insightful learning materials straight to their inbox.

I firmly believe that a real understanding of technology comes only after a thorough look under its hood. Here is the list of projects I stumbled upon digging into containers guts. I've read the source code of these projects to some extent and find some of them really beautiful, while others somewhat - sloppy and inconsistent, but functional. But regardless of the code quality, there is a good opportunity to learn the best common Go practices from one of the hottest real-world projects:

github.com/containerd

This is a home of containerd project. It describes itself as an open and reliable container runtime. If you use docker, you use containerd as well (although indirectly). From the README file: "containerd is designed to be embedded into a larger system, rather than being used directly by developers or end-users."

Notable repositories:

github.com/containernetworking

CNI (Container Network Interface) project focuses on the management of networking interfaces via code. From its README file: "... project, consists of a specification and libraries for writing plugins to configure network interfaces in Linux containers, along with a number of supported plugins. CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted. Because of this focus, CNI has a wide range of support and the specification is simple to implement."

Notable repositories:

github.com/containers

I like this one. It's a home for varying projects (mostly driven by Red Hat) aiming to replace docker's monolith with a set of single-purpose utilities (and or libraries) for building, pulling/pushing images, running containers, etc.

Notable repositories:

github.com/cri-o

Historically, Kubernetes used Docker to manage containers on the worker nodes. After a while, people started pushing more container runtimes (rkt for the second one probably) to Kubernetes. To make the task of adding a new runtime easier (and cleaner), the Kubernetes Container Runtime Interface (CRI) was introduced. Basically, the interface consists of the subset of docker commands (run container, pull image, etc). The cri-o project is a production-grade implementation of a CRI-compatible container manager. It seems like another Red Hat project and it's heavily based on the packages from github.com/containers.

github.com/docker

The leftovers of the old docker (after its renaming to moby):

github.com/kubernetes

Well... It's Kubernetes! By the time of writing, its main repo is github.com/kubernetes/kubernetes and it's a home of the multiple components at the same time. You won't believe, how often other projects from the list in this post have a dependency on the main Kubernetes repo just because they need a tiny bit of its code. And yes, it's huge.

Other notable repositories:

  • minikube - minikube implements a local Kubernetes cluster on macOS, Linux, and Windows. minikube's primary goals are to be the best tool for local Kubernetes application development and to support all Kubernetes features that fit.

  • dashboard - Kubernetes Dashboard is a general purpose, web-based UI for Kubernetes clusters. It allows users to manage applications running in the cluster and troubleshoot them, as well as manage the cluster itself.

  • client-go - Go clients for talking to a kubernetes cluster. This one is nice. If you want to build something new and work with K8s API directly, that's exactly what you need.

  • kubectl - seems like an effort to extract kubectl code from the main monorepo.

github.com/kubernetes-sigs

This is a home for various semi-official Kubernetes-related projects. I personally find interesting these two:

  • kind - Kubernetes IN Docker - local clusters for testing Kubernetes. 🤪

  • cri-tools - CLI and validation tools for Kubelet Container Runtime Interface (CRI). Due to my work on a CRI-compatible container manager I find this project extremely useful. It's like a reduced version of the docker CLI client with an aim to debug and troubleshoot CRI-compatible runtimes. Additionally, it offers an automated conformance test.

github.com/moby

I really like the code quality of everything originated in Docker (including containerd).

  • github.com/moby/moby - aka github.com/docker/docker.

  • buildkit - concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit. Sounds fancy, but haven't checked it out yet.

github.com/opencontainers

This could be one of the most important (but probably not one of the most popular) places when it comes to containers. While runc (also originated by Docker) is the most widely used container runtime out there, the image and runtime specifications are standards that made the interoperability of the container projects possible.

Miscellaneous

Almost every project from the list above uses at least one of the utility packages from the list below (pun intended):

  • github.com/pkg/errors - Package errors provides simple error handling primitives. A handy drop-in replacement for the standard Go errors package.

  • github.com/sirupsen/logrus - Structured, pluggable logging for Go.

  • github.com/spf13/cobra - Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files.

  • github.com/spf13/viper - Go configuration with fangs! Viper is a complete configuration solution for Go applications including 12-Factor apps. It is designed to work within an application, and can handle all types of configuration needs and formats.

  • github.com/urfave/cli - A simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable command line applications in an expressive way.

Instead of conclusion

After staring at the code of these projects for a while, you'll notice that more advanced of them are built on top of more basic ones the re-usage of the code is truly impressive. Having enough understanding of the domain, it's possible to combine these components as lego bricks producing an infinite number of the new project. As an example just take a look at the openfaas or rancher ecosystems. It seems there are people out there coming up with ideas of new projects on breakfast =)

Level up your server-side game — join 20,000 engineers getting insightful learning materials straight to their inbox: