Posts

Showing posts with the label cluster

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

Practicing with Google Cloud Platform - Google Kubernetes Engine to deploy nginx

Image
Introduction This article provides simple step-by-step instructions for those who are new to Google Cloud Platform (GCP) and Google Kubernetes Engine (GKE) . I'll guide you through using  GKE  to create clusters and deploy nginx . The instructions below will primarily use gcloud  and kubectl  to initialize the cluster, which is more convenient than manual management on the Google Cloud interface. Prerequisites First, you need to prepare the following: Have a GCP account with permission to use Cloud services. If you're new, you'll get a $300 free trial to use for 90 days . Create a new GCP project. Enable Compute Engine and Kubernetes Engine services. Install Google Cloud SDK and kubectl For this installation step, refer to the GCP documentation for instructions tailored to your operating system. Once installed, execute the following commands to check if gcloud  and kubectl  are installed: gcloud version kubectl version If you see the version result, we'll proc