Posts

Showing posts from October, 2024

Access Modes in Azure Kubernetes Service (AKS)

Access Modes in Azure Kubernetes Service (AKS) AKS supports four types of access modes: ReadWriteOnce (RWO) ReadWriteMany (RWX) ReadOnlyMany (ROX) ReadWriteOncePod (RWOP) (Kubernetes 1.21 and later) 1. ReadWriteOnce (RWO) A volume with ReadWriteOnce access mode can be mounted as read-write by only one node at a time. Use Case: This is often used for storage directly attached to a single node, such as an Azure Managed Disk or AWS EBS volume , which can only be attached to a single VM (node) at a time. Example: Suppose you have a volume with ReadWriteOnce access mode and you attach it to node1 in an AKS cluster: Pod on Node 1: You can mount this volume in one or more pods running on node1 . These pods can read from and write to the volume as needed. Pod on Node 2: If a pod on node2 tries to mount the same volume, it won’t be able to, as it’s already in use on node1 . Use Case Example For instance, a logging application runni...

Step-by-Step AKS Training: A 60-Day Roadmap to Kubernetes Success

60-Day AKS Training Syllabus 60-Day AKS Training Syllabus Day Concept 1 Introduction to Kubernetes 2 Kubernetes (K8s) architecture 3 Deployments and replica sets in AKS 4 Introduction to services (ClusterIP, NodePort) 5 LoadBalancer service in AKS 6 Configuring YAML for deployments and services 7 Practice: Deploy and expose a simple web app on AKS 8 Containers and Docker basics 9 Using ACR with AKS 10 Namespaces in AKS 11 Labels and selectors in AKS 12 Introduction to PV and PVC 13 Azure Files in AKS 14 Practice: Deploy an app using PVC from Azure Files 15 Deploying an AKS cluster with CLI 16 Scaling and autoscaling in AKS 17 AKS network basics and Azure VNET 18 Network policies in AKS 19 Ingress basics (NGINX Ingress Controller) ...

How to Create a PVC from Azure Files for Use in AKS

  Creating a Persistent Volume Claim (PVC) from Azure Files for Azure Kubernetes Service (AKS) In this guide, we'll walk through the process of creating a Persistent Volume Claim (PVC) from Azure Files to use with Azure Kubernetes Service (AKS). This will help you effectively manage storage for your applications. Prerequisites Set Up Azure CLI Azure file share created (in this case: azurestorageaccountname=technexusdevops ) AKS cluster is created (in this case: nginx-cluster ) Steps to Create the PVC 1. Connect to the AKS Cluster Download the cluster credentials to interact with it using kubectl : az aks get-credentials --resource-group 1-c6aa5250-playground-sandbox --name nginx-cluster 2. Create the Secret for Azure File Share Link your file share with Kubernetes using Azure File. First, create a secret to store your Azure Storage account credentials: Create the Secret Run the follow...

kubernetes Volumes

Kubernetes Volumes Overview Understanding Kubernetes Volumes In Kubernetes, volumes are mechanisms that allow containers within pods to store and share data. They help overcome the temporary nature of container storage by providing persistent storage options that can outlive the pod’s lifecycle. Volumes can be used for various purposes, including: Data Persistence: Keeping data between container restarts. Data Sharing: Sharing files between containers within the same pod. External Storage: Integrating storage from cloud providers, network file systems, or external databases. Types of Volumes in Kubernetes 1. emptyDir Description: A volume that is initially empty and created when a pod is assigned to a node. Usage: Temporary storage for data during the pod’s lifetime; deleted when the pod stops. Common Use Case: Scratch space for temporary d...

Installing Docker on RHEL

Installing Docker on RHEL Installing Docker on RHEL Follow the Steps Below Update the System Packages Before starting the installation, update the system packages: sudo yum upgrade install Copy Code Set Up the Repository Install the yum-utils package (which provides the yum-config-manager utility) and set up the Docker repository: sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo Copy Code Then, create the Docker repository file: [root@ip-172-31-16-148 yum.repos.d]# cat > /etc/yum.repos.d/docker-ce.repo << EOF [docker-ce-stable] name=Docker CE Stable - $basearch baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stable enabled=1 gpgcheck=1 gpgkey=https://dow...

Deploying and Accessing Jenkins on an AKS Cluster

  Deploying and Accessing Jenkins on an AKS Cluster Log in to the Azure portal, switch to  Cloud Shell , and then select  Bash Environment . Choose the storage account where you want to store changes and specify the subscription for the AKS cluster. Identify the resource group name and copy it for later use. If the resource group doesn't exist, create a new one. Copy Code az group list --query [].name Create the cluster by using the following command Copy Code az aks create \ --resource-group 1-da5b0904-playground-sandbox \ --name myjenkinscluster \ --node-count 3 \ --generate-ssh-keys \ --node-vm-size Standard_B2s \ --enable-managed-identity

Deploying and Accessing an Nginx Application to an AKS Cluster

Deploying and Accessing Nginx on an AKS Cluster Log in to the Azure portal, switch to Cloud Shell , and then select Bash Environment . Choose the storage account where you want to store changes and specify the subscription for the AKS cluster. Identify the resource group name and copy it for later use. If the resource group doesn't exist, create a new one. Copy Code az group list --query [].name Output: cloud [ ~ ]$ az group list --query [].name [ "1-da5b0904-playground-sandbox" ] Create the cluster by using the following command: Copy Code az aks create \ --resource-group 1-da5b0904-playground-sandbox \ --name myakscluster \ --node-count 3 \ --generate-ssh-keys \ --node-vm-size Standard_B2s \ --enable-managed-identity ...

Deploying and Accessing an Application to an AKS Cluster

Deploying and Accessing an Application to an AKS Cluster Log in to the Azure portal, switch to Cloud Shell , and then select Bash Environment . Choose the storage account where you want to store changes, and specify the subscription in which you want to create the AKS cluster. Identify the resource group name and copy it for later use. If the resource group does not exist, create a new one. Create the cluster by using the below command  az aks create \ --resource-group 491-0c5d9fef-deploying-and-accessing-an-applicatio \ --name myakscluster \ --node-count 3 \ --generate-ssh-keys \ --node-vm-size Standard_B2s \ --enable-managed-identity Copy Code 5. Once create the cluster verify it by listing the available clusers in resource group . az aks list --output table az aks list --output table Copy Code 6. get the credentials to connect the cluster  az aks get-credentials --name myakscluster --resource-group 491-0c5d9fef-deploying-and...

Step-by-Step Guide to Creating an AKS Cluster-Cloud shell

Image
 Step-by-Step Guide to Creating an AKS Cluster You can create AKS clusters using several methods, such as: Azure CLI-Bash:  A command-line tool for automating Azure tasks. Azure PowerShell:  Use PowerShell commands to manage your AKS cluster. Azure Portal: A user-friendly interface for managing Azure resources. Terraform: Infrastructure as code tool for managing resources. Azure Resource Manager (ARM) Templates: JSON templates for deploying and managing resources. Azure CLI (Bash ) Log in to the Azure portal, switch to Cloud Shell , and then select Bash Environment. Select Storage Account and subscription : Choose the storage account where you want to store changes, and specify the subscription in which you want to create the AKS cluster. Resource Group: Identify the resource group name and copy it for later use. If the resource group does not exist, create a new one. To create an Azure Kubernetes Service (AKS) cluster, the following Azure CLI command is used: az aks...