0% found this document useful (0 votes)
14 views9 pages

gke

Uploaded by

mini10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views9 pages

gke

Uploaded by

mini10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Azure Kubernetes Service (AKS) Overview 🚀

1. What is AKS?

Azure Kubernetes Service (AKS) is a fully managed Kubernetes


service in Microsoft Azure. It simplifies deploying, managing, and
scaling containerized applications while handling cluster
maintenance tasks like upgrades, monitoring, and scaling.

🔹 Key Features

✅ Fully Managed Control Plane – Azure handles Kubernetes control


plane operations.
✅ Seamless Azure Integration – Works with Azure DevOps, AAD,
Monitor, and Security Center.
✅ Auto-Scaling & Load Balancing – Supports Horizontal Pod
Autoscaler (HPA) and Cluster Autoscaler.
✅ Security & Compliance – Integrated with Azure Active Directory
(AAD), RBAC, and Azure Policy.
✅ Hybrid & Multi-Cloud Support – Works with Azure Arc and AKS
on Edge.

2. AKS Architecture

🔹 Key Components

 Control Plane (Managed by Azure) – Handles Kubernetes API


Server, Scheduler, Controller Manager, etcd.

 Node Pools – Groups of worker nodes running on Azure


Virtual Machines (VMs).

 Azure CNI (Networking) – Provides pod networking with VNet


integration.

 Storage – Supports Azure Files, Azure Disks, Azure Blob


Storage for persistent data.

 Security – Uses Azure RBAC, AAD, and Azure Policy for


access control.

3. Deploying AKS Cluster

🔹 Using Azure CLI

# Create an AKS cluster


az aks create --resource-group myResourceGroup --name
myAKSCluster --node-count 3 --enable-addons monitoring --
generate-ssh-keys

# Get AKS credentials for kubectl access

az aks get-credentials --resource-group myResourceGroup --name


myAKSCluster

# Deploy an application

kubectl apply -f deployment.yaml

🔹 Using Terraform for Infrastructure as Code

resource "azurerm_kubernetes_cluster" "aks" {

name = "myAKSCluster"

location = azurerm_resource_group.rg.location

resource_group_name = azurerm_resource_group.rg.name

dns_prefix = "myaks"

default_node_pool {

name = "default"

node_count = 3

vm_size = "Standard_DS2_v2"

identity {

type = "SystemAssigned"

4. AKS Networking & Security

🔹 Networking Options

 Azure CNI – Assigns IP addresses from the VNet to pods.


 Kubenet – Uses NAT for pod IP allocation (simpler but less
flexible).

 Private AKS Cluster – Restricts API Server access to Azure


Virtual Network.

 Service Mesh Integration – Supports Istio, Linkerd, Open


Service Mesh (OSM).

🔹 Security Best Practices

✔ Azure Active Directory (AAD) Integration – Secure access using


AAD.
✔ Role-Based Access Control (RBAC) – Restrict user permissions
using Azure RBAC.
✔ Azure Policy for Kubernetes – Enforce security policies (e.g.,
prevent privileged containers).
✔ Microsoft Defender for Kubernetes – Detect and prevent
threats.
✔ Secrets Management – Use Azure Key Vault instead of
Kubernetes Secrets.
✔ Enable Network Policies – Restrict pod-to-pod traffic using
Calico or Azure Network Policies.

5. AKS Storage & Monitoring

🔹 Storage Options

 Azure Disks – Best for stateful workloads.

 Azure Files – NFS file storage for shared access.

 Blob Storage – Object storage for unstructured data.

🔹 Logging & Monitoring

 Azure Monitor & Log Analytics – Collects container logs &


metrics.

 Prometheus & Grafana – Open-source monitoring solution.

 Kube State Metrics – For detailed Kubernetes cluster


insights.

6. AKS CI/CD Integration

 Azure DevOps – Automate deployments using Azure


Pipelines.
 GitHub Actions – Deploy apps with GitHub CI/CD workflows.

 ArgoCD & FluxCD – GitOps tools for AKS.

 Helm & Kustomize – Manage Kubernetes manifests.

Example: Deploying with Helm

helm install my-app ./my-chart --namespace production

7. AKS Cost Optimization Tips 💰

✔ Use Spot VMs for worker nodes.


✔ Optimize node pools with Autoscaler & Right-sizing.
✔ Use B-series VMs for non-production environments.
✔ Enable Azure Reservations & Savings Plans.

8. AKS Alternatives

 Amazon EKS – Managed Kubernetes on AWS.

 Google GKE – Kubernetes service on Google Cloud.

 Rancher – Kubernetes management across hybrid/multi-


cloud.

9. Common AKS Issues & Fixes

Issue Cause Solution

Pods stuck in Insufficient node Scale node pool, check


Pending resources kubectl describe pod

Nodes not Incorrect service Validate az aks show and


joining cluster principal or IAM role permissions

Service not Incorrect networking Check VNet, NSG, and


reachable setup firewall rules

RBAC
Missing Azure RBAC Assign correct role via az
permission
role role assignment create
denied
Need help with AKS setup, best practices, or troubleshooting? 🚀

Let’s discuss! 😊 Google Kubernetes Engine (GKE) Overview 🚀

1. What is GKE?

Google Kubernetes Engine (GKE) is a managed Kubernetes


service on Google Cloud that simplifies deployment, scaling, and
management of containerized applications. GKE provides
automatic upgrades, security patches, monitoring, and
integration with Google Cloud services.

🔹 Key Features

✅ Fully Managed Control Plane – Google manages Kubernetes API


server, etcd, and scheduling.
✅ Auto-Scaling & Load Balancing – Supports Cluster Autoscaler,
Horizontal Pod Autoscaler (HPA), and Vertical Pod Autoscaler
(VPA).
✅ Multi-Cloud & Hybrid Support – Works with Anthos for multi-
cloud and on-prem management.
✅ Built-in Security – Includes RBAC, IAM, Google Cloud Armor, and
Binary Authorization.
✅ VPC-Native Networking – Pods get Google Cloud VPC IPs with no
overlay networks.

2. GKE Architecture

🔹 Key Components

 Control Plane (Managed by Google) – API server, Scheduler,


Controller Manager, and etcd.

 Node Pools – Groups of worker nodes running on Google


Compute Engine (GCE) VMs.

 VPC-Native Networking – Assigns VPC IPs to pods, enabling


better network performance.

 Storage – Supports Persistent Disks, Filestore (NFS), Cloud


Storage (S3 equivalent).

 Security – Uses IAM, RBAC, Binary Authorization, and


Shielded Nodes.

3. GKE Deployment Options


Deployment
Description
Mode

Fully managed Kubernetes clusters with


Standard GKE
customizable node pools.

Hands-off Kubernetes where Google manages


Autopilot GKE
worker nodes.

GKE on-prem Run GKE on VMware or Bare Metal using Anthos.

GKE Multi- Manage GKE clusters across AWS, Azure, and on-
Cloud prem.

4. Deploying a GKE Cluster

🔹 Using Google Cloud CLI

# Enable GKE API

gcloud services enable container.googleapis.com

# Create a Standard GKE Cluster

gcloud container clusters create my-gke-cluster \

--num-nodes 3 \

--zone us-central1-a

# Get cluster credentials for kubectl access

gcloud container clusters get-credentials my-gke-cluster --zone


us-central1-a

# Deploy an application

kubectl apply -f deployment.yaml

🔹 Using Terraform for Infrastructure as Code

resource "google_container_cluster" "gke_cluster" {

name = "my-gke-cluster"

location = "us-central1-a"
node_pool {

name = "default-pool"

node_count = 3

machine_type = "e2-standard-4"

5. GKE Networking & Security

🔹 Networking Options

 VPC-Native Mode (Recommended) – Pods get Google VPC IPs


for better performance.

 Private Cluster – Restricts Kubernetes API to a private IP.

 Multi-Zone & Regional Clusters – High availability across


zones or regions.

 Ingress Controller – Uses GCP Load Balancer for traffic


routing.

 Service Mesh – Supports Istio and Anthos Service Mesh


(ASM) for advanced networking.

🔹 Security Best Practices

✔ IAM & RBAC – Assign least privilege access to users &


workloads.
✔ Binary Authorization – Ensures only trusted container images
run.
✔ GKE Shielded Nodes – Protects against rootkits & boot malware.
✔ Workload Identity – Uses Google IAM instead of Kubernetes
secrets.
✔ Google Cloud Armor – Protects against DDoS attacks.
✔ Enable Network Policies – Restricts pod-to-pod communication.

6. GKE Storage & Monitoring

🔹 Storage Options

 Persistent Disks – Best for stateful workloads.


 Filestore (NFS) – Shared file storage for applications.

 Cloud Storage – Object storage for backups & logs.

🔹 Logging & Monitoring

 Cloud Logging & Monitoring – Native Google Cloud


observability.

 Prometheus & Grafana – Open-source monitoring stack.

 Kubernetes Dashboard – For cluster visualization.

7. GKE CI/CD Integration

 Cloud Build – Native GCP CI/CD pipeline for container builds.

 GitHub Actions – Automate deployments with GitHub


workflows.

 Jenkins & Spinnaker – Continuous deployment tools for GKE.

 ArgoCD & FluxCD – GitOps solutions for Kubernetes.

 Helm & Kustomize – Manage Kubernetes manifests.

Example: Deploying with Helm

helm install my-app ./my-chart --namespace production

8. GKE Cost Optimization Tips 💰

✔ Use Autopilot mode to reduce node management costs.


✔ Enable Preemptible Nodes for stateless workloads.
✔ Optimize Node Pools with Autoscaler for right-sizing.
✔ Use GCP Committed Use Discounts (CUDs) for savings.
✔ Use Spot VMs for temporary workloads.

9. GKE Alternatives

 Amazon EKS – Managed Kubernetes on AWS.

 Azure AKS – Kubernetes service on Azure.

 OpenShift – Enterprise Kubernetes with built-in CI/CD.

 Rancher – Kubernetes management across hybrid/multi-


cloud.
10. Common GKE Issues & Fixes

Issue Cause Solution

Pods stuck in Insufficient Scale node pool, check kubectl


Pending node resources describe pod

Nodes not IAM permission


Verify gcloud iam roles list
joining cluster issues

Incorrect
Service not
networking Check VPC firewall rules
reachable
setup

RBAC
Missing IAM Assign correct role via gcloud
permission
roles projects add-iam-policy-binding
denied

Need help with GKE setup, best practices, or troubleshooting? 🚀


Let’s discuss! 😊

You might also like