2023 Annual Summary Reflections and Aspirations

My 2023 Annual Summary As 2023 swiftly draws to a close, my university life is nearing its end with just half a year remaining. A friend once said, “What’s frightening is not losing your passion for work, but never being able to find it again.” This year, I encountered many people and experienced numerous events, gradually shaping my world view. I’m fond of Maslow’s hierarchy of needs and often reflect on my own state through it....

December 30, 2023 · 13 min · 2664 words · Xinwei Xiong, Me

GitOps Practice Theory: In-Depth Analysis of Kubernetes Deployment Strategies

Today we will take a look at the theory and practice of kubernetes and gitops Command introduction First, let’s take a look at the subnaming supported by kubectl for our convenience: kubectl apply - applies the definition of one or more resources. Typically used to deploy applications or update resources. kubectl get - displays information about one or more resources. This is a common command to view the status of resources in a Kubernetes cluster....

November 25, 2023 · 40 min · 8446 words · Xinwei Xiong, Me

Deployment and Design of Management Backend and Monitoring

OpenIM offers various flexible deployment options to suit different environments and requirements. Here is a simplified and optimized description of these deployment options: Source Code Deployment: Regular Source Code Deployment: Deployment using the nohup method. This is a basic deployment method suitable for development and testing environments. For details, refer to the Regular Source Code Deployment Guide. Production-Level Deployment: Deployment using the system method, more suitable for production environments....

November 15, 2023 · 7 min · 1347 words · Xinwei Xiong, Me

Hugo Advanced Tutorial

136: Hugo Advanced Coming to the advanced part, you need to learn some advanced Hugo techniques in depth. Module Hugo modules are the core building blocks of Hugo. A module can be your main project or a smaller module that provides one or more of the 7* component types defined in Hugo: **static**, **content**, **layouts**, **data**, **assets**, **i18n** and **archetypes**. You can combine modules in any combination you like, and you can even mount directories from non-Hugo projects to form a large virtual union file system....

November 6, 2023 · 33 min · 6878 words · Xinwei Xiong, Me

Kubernetes for Kustomize Learning

Introduction About Kustomize GitHub Repository Get Started Kustomize is an open-source configuration management tool designed specifically for Kubernetes. It helps users customize Kubernetes objects and manage them declaratively without modifying the original YAML files. This means you can retain the basic settings for applications and components while overriding default settings with declarative YAML documents called “patches” without altering the original files. Kustomize provides a declarative approach that aligns with Kubernetes philosophy and allows customization of Kubernetes configurations in a reusable, fast, debuggable, and scalable manner....

October 31, 2023 · 22 min · 4565 words · Xinwei Xiong, Me

OpenIM Use Harbor Build Enterprise Mirror Repositories

Requirements OpenIM provides various public image registry addresses, such as aliyun, github, Docker Hub, and more. Read https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md for more image building guidelines. Most enterprises choose to set up their own image repository using Harbor, integrating it into their CI/CD pipeline to eventually replace Docker Hub and further reduce image storage costs. Additionally, in a production environment, Harbor generally enables TLS, so you will also need to prepare a valid domain name....

October 25, 2023 · 5 min · 987 words · Xinwei Xiong, Me

Learn About Automated Testing

Automated testing practices and strategies for GitHub open source Go projects in the cloud native field introduce As OpenIM, a popular project on Github, how to create value in the cloud native era is very important. OpenIM is a small and high-quality team, and we do not have particularly in-depth insights in automation. Continuous Integration and Continuous Delivery (CI/CD) using GitHub Actions: GitHub Actions provides a platform to automatically build and test Go language projects....

October 14, 2023 · 59 min · 12489 words · Xinwei Xiong, Me

Deep Dive into Kubernetes CNI, CRI, CSI Components

Container Runtime Container Runtime runs on every node in a Kubernetes (k8s) cluster and is responsible for the entire container lifecycle. Docker is currently the most widely used. With the development of container cloud, more and more container runtimes have emerged. To solve the integration problems between these container runtimes and Kubernetes, the community introduced CRI (Container Runtime Interface) in Kubernetes version 1.5 to support more container runtimes. What is CRI CRI is a set of gRPC services defined by Kubernetes....

September 28, 2023 · 31 min · 6545 words · Xinwei Xiong, Me

Kubernetes Control Plane - Detailed Analysis of Kubelet

Kubelet Component Analysis Understanding kubelet The Kubelet component runs on Node nodes, maintaining running Pods and providing Kubernetes runtime environment, mainly accomplishing the following missions: Monitor Pods assigned to this Node Mount volumes required by Pods Download Pod secrets Run containers in Pods through docker/rkt Periodically execute liveness probes defined for containers in Pods Report Pod status to other system components Report Node status The core process of kubelet managing Pods mainly includes three steps....

September 28, 2023 · 10 min · 1991 words · Xinwei Xiong, Me

Kubernetes Control Plane - Scheduler

Scheduler kube-scheduler is responsible for scheduling and assigning Pods to nodes within the cluster. It listens to kube-apiserver, queries for Pods that haven’t been assigned to Nodes, and then assigns nodes to these Pods based on scheduling policies (updating the Pod’s NodeName field). The scheduler needs to fully consider many factors: Fair scheduling; Efficient resource utilization; QoS; affinity and anti-affinity; data locality; inter-workload interference; deadlines. kube-scheduler scheduling is divided into two phases, predicate and priority:...

September 28, 2023 · 8 min · 1664 words · Xinwei Xiong, Me