Posts

Showing posts with the label gcp

Kubernetes Pod Cheatsheet

Image
Introduction This article is here to guide you on using Pod  in Kubernetes . I'll give you some concepts and commands that Kubernetes often uses to handle Pod . Pod Introduction A Pod is the smallest deployable unit in Kubernetes . Here are some key points about Pods: Multiple Containers : A Pod can contain more than one container, and there's no limit to how many containers you can run inside a Pod. These containers are relatively tightly coupled and share resources such as disk. Shared Resources : All the containers inside a Pod are connected via localhost and share the same memory space. They also share storage (volumes), IP address, and configuration information. Unique IP Address : Each Pod gets a unique IP address. Ephemeral Nature : Pods are ephemeral in nature; they can be created, deleted, and updated. Prerequisites Before we begin, make sure you have the following: For Kubernetes systems, you can use minikube or have permissions to provision resources on cloud pro

Deploy ReactJS application to Firebase in 5 minutes

Image
Introduction Firebase Firebase is a product of Google that helps developers build, manage, and grow their apps easily. It’s designed to make app development faster and more secure. In this article, I'll guide you through deploying a ReactJS application on Firebase . Google provides Firebase hosting for free, offering stable speed and SSL certificates, making it ideal for creating HTTPS-supported websites. Creating a React Application Firstly, you need to create a React Application project or use an existing one. You can use tools like vite , create-react-app , or Nx/Nrwl . The project initialization process is straightforward and can be easily found. Here, I'll use Nx, a build system that provides various tools for developing projects in multiple programming languages. You can learn more about Nx/React here . After successfully initializing and running the React application, the result should look like this: Next, let's proceed to build the React application. If you

Using Terraform to Create VM Instances and Connect via SSH

Image
Introduction In the previous article, I introduced some basic concepts about Terraform , as well as the advantages of using Terraform . If you're not familiar with it yet, take a look to get some basic knowledge before diving into the next topics . In this article, I will guide you through writing Terraform files to deploy a Virtual Machine (VM) instance to the Google Cloud Provider . Creating a Service Account If you already have a Google Cloud account with the necessary permissions, you can log in to work with Terraform as I instructed in the previous article. However, if for some reason you can't log in, or if you need a better authentication method, you can create a Service Account to use. In simple terms, a Google Cloud account is allowed to create Service Accounts . Each Service Account is assigned roles , and each role has corresponding permissions allowing the Service Account to perform specific tasks based on permissions . To create a Service Account , use th

Using Terraform to deploy a docker image on Google Kubernetes Engine

Image
Introduction to Terraform Terraform is an Infrastructure as Code (IaC) tool developed by HashiCorp . It allows you to build, change, and version your infrastructure safely and efficiently. Here are some key features of Terraform : Human-Readable Configuration Files : Terraform lets you define both cloud and on-prem resources in human-readable configuration files that you can version, reuse, and share. Multi-Cloud Support : Terraform can manage infrastructure on multiple cloud platforms. Providers enable Terraform to work with virtually any platform or service with an accessible API. Lifecycle Management : The core Terraform workflow consists of three stages: Write : Define resources across multiple cloud providers and services. Plan : Terraform creates an execution plan describing what it will create, update, or destroy. Apply : On approval, Terraform performs the proposed operations in the correct order, respecting any resource dependencies. State Management : Terraform keeps track

Deploying a NodeJS Server on Google Kubernetes Engine

Image
Introduction to GKE Google Kubernetes Engine (GKE) is a managed Kubernetes service provided by Google Cloud Platform , facilitating simple and efficient deployment of Docker images. We only need to provide some configuration for the number of nodes, machine types, and replicas to use. Some Concepts Cluster A Cluster is a collection of Nodes where Kubernetes can deploy applications. A cluster includes at least one Master Node and multiple Worker Nodes . The Master Node is used to manage the Worker Nodes . Node A Node is a server in the Kubernetes Cluster. Nodes can be physical servers or virtual machines. Each Node runs  Kubernetes , which is responsible for communication between the Master Node and Worker Node , as well as managing Pods and containers running on it. Pod A Pod is the smallest deployable unit in Kubernetes . Each Pod contains one or more containers, typically Docker containers. Containers in the same Pod share a network namespace, meaning they have the same