Posts

DevOps Practice Series

Image
Introduction DevOps is a combination of development (Dev) and operations (Ops), aimed at uniting people, processes, and technology to enhance the software development lifecycle. Here are some key aspects of DevOps: Collaboration and Communication: DevOps fosters a culture where development, IT operations, quality engineering, and security teams work together seamlessly. Continuous Integration and Continuous Delivery (CI/CD): These practices automate the integration and delivery of code changes, ensuring faster and more reliable software releases¹. Infrastructure as Code (IaC): This approach involves managing and provisioning computing infrastructure through machine-readable scripts, rather than physical hardware configuration¹. Monitoring and Logging: Continuous monitoring and logging help teams to detect issues early and maintain system reliability. Automation: Automating repetitive tasks reduces errors and increases efficiency, allowing teams to focus on more strategic work. By imple

Google Cloud Platform Practice Series

Image
Introduction Google Cloud Platform (GCP) is a suite of cloud computing services provided by Google. It allows you to build, deploy, and scale applications, websites, and services on the same infrastructure that Google uses internally for its end-user products like Google Search, Gmail, and YouTube. Key Features of GCP Compute Services: Includes virtual machines (VMs) with Google Compute Engine, serverless computing with Google Cloud Functions, and container orchestration with Google Kubernetes Engine (GKE). Storage and Databases: Offers various storage options like Google Cloud Storage for object storage, Google Cloud SQL for managed relational databases, and Google Bigtable for NoSQL databases. Networking: Provides a global network infrastructure with services like Virtual Private Cloud (VPC), Cloud Load Balancing, and Cloud CDN for content delivery. Big Data and Machine Learning: Includes tools like BigQuery for data warehousing, Dataflow for stream and batch data processing, and AI

Kubernetes Practice Series

Image
Introduction Kubernetes (often abbreviated as K8s ) is an open-source system designed to automate the deployment, scaling, and management of containerized applications. This page serves as a collection of articles related to Kubernetes (K8s) , including theoretical concepts and practical guides on using Kubernetes to set up essential tools for the software development process. I will continue to update this series with new articles as ideas come to mind, to ensure the series becomes more comprehensive. The articles are arranged in increasing order of difficulty to make it easier for you to follow. If you have time, it's recommended that you start from the beginning of the series to acquire the necessary knowledge and information that will prepare you for the subsequent articles. Key Topics Covered in This Series Basic Knowledge : Fundamental concepts, common commands, etc. Resources : Pod, Deployment, Service, StatefulSet, Ingress, etc. Pod Autoscaler : Horizontal vs. Vertical sc

Docker Practice Series

Image
Introduction Docker is an open platform for developing, shipping, and running applications. This page is dedicated to compiling articles related to Docker , covering both the theoretical aspects and practical applications of Docker in setting up popular tools essential for software development. I will be updating this series with more articles in the future as new ideas for topics arise. The articles are arranged in increasing order of difficulty, making it easier for you to follow along. If you have the time, I recommend starting from the beginning of the series to ensure that you grasp the necessary knowledge and information needed for the more advanced articles later on. Here are some key topics in the series that you need to explore to effectively use Docker : Basic knowledge Docker commands Docker Compose Building Docker images Performance improvement Integration with CI/CD Once you have a solid understanding of the foundational knowledge, the extended topics (including advanced

React Practice Series

Image
Introduction React is a JavaScript library created by Facebook , often referred to as the most popular frontend framework today. This page aims to gather articles related to ReactJS , covering topics such as theory, features, and commonly used packages in the process of building ReactJS applications. I will update this series with more articles in the future as new ideas for content come up. The articles are arranged in increasing order of difficulty, so if you have time, it's recommended to start from the beginning of the series. This will ensure you grasp the essential knowledge and information needed for the subsequent articles. Here are some key topics in the series that you need to explore to effectively use ReactJS : Fundamental : React Hook, React Context, Lazy load, etc. State management : redux, mobx, recoil, etc. Middleware libraries : redux-thunk, redux-saga, redux-observable, etc. Popular packages : react-query, immer, styled-components, etc. Rendering techniques : C

NodeJS Practice Series

Image
Introduction NodeJS is an open-source and cross-platform JavaScript runtime environment . Here are some key points about NodeJS : V8 Engine : NodeJS runs on the V8 JavaScript engine , which is also the core of Google Chrome . This allows NodeJS to be highly performant. Asynchronous and Non-Blocking : NodeJS  uses an event-driven, non-blocking I/O model. It’s lightweight and efficient, making it ideal for data-intensive real-time applications. Single-Threaded : NodeJS  runs in a single process, handling multiple requests without creating new threads. It eliminates waiting and continues with the next request. Common Language : Frontend developers who write JavaScript for browsers can use the same language for server-side code in NodeJS . You can even use the latest ECMAScript standards without waiting for browser updates. This page is designed to compile articles related to NodeJS , including how to integrate it with various libraries and relevant tech stacks. I will continue to u

Kubernetes Horizontal Pod Autoscaling

Image
Introduction There are two common scaling methods: Vertical scaling and Horizontal scaling . Vertical scaling involves adding more hardware, such as RAM or CPU , or increasing the number of server nodes. Horizontal scaling , on the other hand, means adding more instances of an app to fully utilize the available resources on a node or server. However, horizontal scaling has its limits. Once a node's resources are maxed out, vertical scaling becomes necessary. This article will focus on horizontal scaling using Kubernetes Horizontal Pod Autoscaling (HPA) , which automatically scales resources up or down based on system demands. Implementation Process 1. Build a Docker image for your application. 2. Deploy the image using a Deployment and LoadBalancer service. 3. Configure HPA to automatically scale resources. To use HPA for auto-scaling based on CPU/Memory , Kubernetes must have the metrics-server installed. If you’re using a cloud provider, the metrics-server is usually instal

SSH to Google Compute Engine

Image
Introduction I previously wrote a guide on creating a Virtual Machine (VM) instance on Google Cloud and accessing it via gcloud . However, if your Google Cloud account lacks permission to manage VM instances, or if you want to create a VM instance that allows SSH for easy sharing with other users and compatibility with various SSH tools, follow the steps below. Configure SSH access for VM instance Firstly, you need to create a compute instance as follows: gcloud compute instances create {instance name} \ --zone={zone} \ --machine-type= { machine type} # ex: gcloud compute instances create instance-1 \ --zone=asia-southeast1-a \ --machine-type=e2-micro Next, SSH into this VM to perform the necessary configurations. Typically, a Google VM instance will have a Distributor ID of Debian . Use the following command to check this before proceeding with the next steps. lsb_release -a Next, set the password for the root account as follows: sudo passwd Next, use t

Setting Up an EXTERNAL-IP for Local LoadBalancer Service

Image
Introduction If you've used a LoadBalancer service from a Cloud Provider , you'll know how convenient it is to have an EXTERNAL-IP assigned automatically. However, when using local Kubernetes , the default setting doesn't provide an EXTERNAL-IP . Building on our previous discussion, this guide will show you how to use ` cloud-provider-kind ` to assign an EXTERNAL-IP to your local LoadBalancer service . First, make sure you've set up your local Kubernetes using Kind as outlined in my previous guide. This is necessary to proceed with the next steps. Installing cloud-provider-kind Since this is a Go package , you'll need to install Go first. Then, you can install the package with the following steps: go install sigs.k8s.io/cloud-provider-kind@latest Then execute command to use: cloud-provider-kind Keep in mind that you need to keep the terminal running while using Kubernetes to create the EXTERNAL-IP . Testing with local EXTERNAL-IP Create a deployment and e

Setting up Kubernetes Dashboard with Kind

Image
Introduction In a previous article, I guided you through using Helm to deploy on Google Kubernetes Engine . However, if you want to cut down costs by using Kubernetes in your local environment instead of relying on a cloud provider during development, then Kind is your go-to. There are several tools to help set up Kubernetes locally, such as MiniKube , Kind , K3S , KubeAdm , and more. Each tool has its own pros and cons. In this article, I'll walk you through using Kind to quickly set up a Kubernetes cluster on Docker . Kind stands out for its compactness, making Kubernetes start up quickly, being user-friendly, and supporting the latest Kubernetes versions. Working with Kind Firstly, follow the instructions here to install Kind according to your operating system. If you're using Ubuntu , execute the command: [ $( uname -m ) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.23.0/kind-linux-amd64 chmod +x ./kind sudo mv ./kind /usr/local/bin/ki