Interaction between client-go and Kubernetes operator. Image from [sample-controller](https://github.com/kubernetes/sample-controller/blob/master/docs/images/client-go-controller-interaction.jpeg)

How to Write a Kubernetes Operator Using client-go

What is client-go? client-go is the official Golang client for Kubernetes, responsible for interacting with the Kubernetes API server using REST API. In fact, client-go can do almost anything, not just for writing operators. Even the internal implementation of kubectl is based on client-go. As for more specialized frameworks used to write operators, including controller-runtime , kubebuilder , and operator-sdk , they will be introduced later in this series. ...

Posted on: 2024-09-14 · Edited on: 2024-09-14 · Chi-Sheng Liu
Image from [GraphRAG](https://github.com/microsoft/graphrag/blob/e7ee8cb8a53b0ca423158e0acf54f143b4938e2a/docsite/img/GraphRag-Figure1.jpg) and [Ollama](https://github.com/ollama/ollama/issues/2152)

GraphRAG Local Setup via Ollama: Pitfalls Prevention Guide

TL;DR If you just want to see the conclusion, skip to the Summary . Please note that the content discussed here is only guaranteed to work for version 0.3.2. Other versions have not been tested. Introduction GraphRAG is a new Retrieval-Augmented Generation (RAG) technology released by Microsoft. Unlike the usual RAG approach, which breaks text into chunks, vectorizes them, and stores them in a vector store, and then compares the similarity by vectorizing the user’s query, GraphRAG extracts information from text and builds a Knowledge Graph. This approach has the advantage of better understanding the complex relationships between different documents. ...

Posted on: 2024-09-11 · Edited on: 2024-09-13 · Chi-Sheng Liu
Image modified from [Kubernetes Icons Set](https://github.com/kubernetes/community/tree/master/icons)

What are Kubernetes Operators and Custom Resources?

Kubernetes API Resources I assume that you have a basic understanding of Kubernetes and know how to use kubectl. Pod, ReplicaSet, Service, and even Namespace are actually types of API Resources. You can use kubectl api-resources to view all the API Resources currently available in your Kubernetes cluster. $ kubectl api-resources NAME SHORTNAMES APIVERSION NAMESPACED KIND bindings v1 true Binding componentstatuses cs v1 false ComponentStatus configmaps cm v1 true ConfigMap endpoints ep v1 true Endpoints events ev v1 true Event limitranges limits v1 true LimitRange namespaces ns v1 false Namespace nodes no v1 false Node persistentvolumeclaims pvc v1 true PersistentVolumeClaim persistentvolumes pv v1 false PersistentVolume pods po v1 true Pod podtemplates v1 true PodTemplate replicationcontrollers rc v1 true ReplicationController resourcequotas quota v1 true ResourceQuota secrets v1 true Secret serviceaccounts sa v1 true ServiceAccount services svc v1 true Service ... ...

Posted on: 2024-08-29 · Edited on: 2024-08-31 · Chi-Sheng Liu
Photo by [Chris Ried](https://unsplash.com/@cdr6934?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) on [Unsplash](https://unsplash.com/photos/a-computer-screen-with-a-bunch-of-code-on-it-ieic5Tq8YMk?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash)

5 Things to Know Before Making Open Source Contributions

Read the Documentation There are a few essential documents that you must read. These might be .md files, .rst files, or specific pages on the project’s website: README.md: The file that introduces the project. Contribution Guide: This outlines how to contribute to the project, including any formatting or styling rules you need to follow when submitting contributions. Code of Conduct: The community’s behavior guidelines. Generally, as long as you are not too rude or disrespectful, you should be fine, but it’s still important to read through it. Issue Tracker Understand what issue tracker the project uses. Common ones include GitHub issues or JIRA. As a beginner, it’s typical to start by looking for existing issues to work on. If you need to open an issue, be sure to search first to see if a similar issue has already been opened. ...

Posted on: 2024-08-23 · Edited on: 2024-08-31 · Chi-Sheng Liu
Lazygit's user interface

How to Use Lazygit to Skyrocket Your Git Efficiency

Introduction As an engineer, Git is an essential tool, and Lazygit is a command-line Git tool written in Golang that can save you a significant amount of time by reducing the need to manually type Git commands. Saving a few seconds each time can add up to hours saved over the course of a year. Don’t tell me you type commands quickly (you’re just too lazy to learn new tools), or that you use something like alias gs='git status' to speed things up (you’re just afraid of learning a lot of shortcuts). Trust me, nothing can be faster than using this tool. ...

Posted on: 2024-08-19 · Edited on: 2024-08-31 · Chi-Sheng Liu