gcp gke docs 01 Google Cloud Account Creation 02 Create GKE Standard Public Cluster Course Modules 04 Install gcloud CLI on Windows OS 03 Install gcloud CLI on mac OS

Answer:
# [GCP GKE Google Kubernetes Engine DevOps 75 Real-World Demos](https://links.stacksimplify.com/gcp-google-kubernetes-engine-gke-with-devops)

[![Image](images/course-title.png "Google Kubernetes Engine GKE with DevOps 75 Real-World Demos")](https://links.stacksimplify.com/gcp-google-kubernetes-engine-gke-with-devops)

## Course Modules
01. Google Cloud Account Creation
02. Create GKE Standard Public Cluster
03. Install gcloud CLI on mac OS
04. Install gcloud CLI on Windows OS
05. Docker Fundamentals
06. Kubernetes Pods
07. Kubernetes ReplicaSets
08. Kubernetes Deployment - CREATE
09. Kubernetes Deployment - UPDATE
10. Kubernetes Deployment - ROLLBACK
11. Kubernetes Deployments - Pause and Resume
12. Kubernetes ClusterIP and Load Balancer Service
13. YAML Basics
14. Kubernetes Pod  & Service using YAML
15. Kubernetes ReplicaSets using YAML
16. Kubernetes Deployment using YAML
17. Kubernetes Services using YAML
18.  GKE Kubernetes NodePort Service
19. GKE Kubernetes Headless Service
20. GKE Private Cluster
21. How to use GCP Persistent Disks in GKE ?
22. How to use Balanced Persistent Disk in GKE ?
23. How to use Custom Storage Class in GKE for Persistent Disks ?
24. How to use Pre-existing Persistent Disks in GKE ?
25. How to use Regional Persistent Disks in GKE ?
26. How to perform Persistent Disk  Volume Snapshots and Volume Restore ?
28. GKE Workloads and Cloud SQL with Public IP
29. GKE Workloads and Cloud SQL with Private IP
30. GKE Workloads and Cloud SQL with Private IP and No ExternalName Service
31. How to use Google Cloud File Store in GKE ?
32. How to use Custom Storage Class for File Store in GKE ?
33. How to perform File Store Instance Volume Snapshots and Volume Restore ?
34. Ingress Service Basics
35. Ingress Context Path based Routing
36. Ingress Custom Health Checks using Readiness Probes
37. Register a Google Cloud Domain for some advanced Ingress Service Demos
38. Ingress with Static External IP and Cloud DNS
39. Google Managed SSL Certificates for Ingress
40. Ingress HTTP to HTTPS Redirect
41. GKE Workload Identity
42. External DNS Controller Install
43. External DNS - Ingress Service
44. External DNS - Kubernetes Service
45. Ingress Name based Virtual Host Routing
46. Ingress SSL Policy
47. Ingress with Identity-Aware Proxy
48. Ingress with Self Signed SSL Certificates
49. Ingress with Pre-shared SSL Certificates
50. Ingress with Cloud CDN, HTTP Access Logging and Timeouts
51. Ingress with Client IP Affinity
52. Ingress with Cookie Affinity
53. Ingress with Custom Health Checks using BackendConfig CRD
54. Ingress Internal Load Balancer
55. Ingress with Google Cloud Armor
56. Google Artifact Registry
57. GKE Continuous Integration
58. GKE Continuous Delivery
59. Kubernetes Liveness Probes
60. Kubernetes Startup Probes
61. Kubernetes Readiness Probe
62. Kubernetes Requests and Limits
63. GKE Cluster Autoscaling
64. Kubernetes Namespaces
65. Kubernetes Namespaces Resource Quota
66. Kubernetes Namespaces Limit Range
67. Kubernetes Horizontal Pod Autoscaler
68. GKE Autopilot Cluster
69. How to manage Multiple Cluster access in kubeconfig ?

## Kubernetes Concepts Covered
01. Kubernetes Deployments (Create, Update, Rollback, Pause, Resume)
02. Kubernetes Pods
03. Kubernetes Service of Type LoadBalancer
04. Kubernetes Service of Type ClusterIP
05. Kubernetes Ingress Service
06. Kubernetes Storage Class
07. Kubernetes Storage Persistent Volume
08. Kubernetes Storage Persistent Volume Claim
09. Kubernetes Cluster Autoscaler
10. Kubernetes Horizontal Pod Autoscaler
11. Kubernetes Namespaces
12. Kubernetes Namespaces Resource Quota
13. Kubernetes Namespaces Limit Range
14. Kubernetes Service Accounts
15. Kubernetes ConfigMaps
16. Kubernetes Requests and Limits
17. Kubernetes Worker Nodes
18. Kubernetes Service of Type NodePort
19. Kubernetes Service of Type Headless
20. Kubernetes ReplicaSets

## Google Services Covered
01. Google GKE Standard Cluster
02. Google GKE Autopilot Cluster
03. Compute Engine - Virtual Machines
04. Compute Engine - Storage Disks
05. Compute Engine - Storage Snapshots
06. Compute Engine - Storage Images
07. Compute Engine - Instance Groups
08. Compute Engine - Health Checks
09. Compute Engine - Network Endpoint Groups
10. VPC Networks - VPC
11. VPC Network - External and Internal IP Addresses
12. VPC Network - Firewall
13. Network Services - Load Balancing
14. Network Services - Cloud DNS
15. Network Services - Cloud CDN
16. Network Services - Cloud NAT
17. Network Services - Cloud Domains
18. Network Services - Private Service Connection
19. Network Security - Cloud Armor
20. Network Security - SSL Policies
21. IAM & Admin - IAM
22. IAM & Admin - Service Accounts
23. IAM & Admin - Roles
24. IAM & Admin - Identity-Aware Proxy
25. DevOps - Cloud Source Repositories
26. DevOps - Cloud Build
27. DevOps - Cloud Storage
28. SQL - Cloud SQL
29. Storage - Filestore
30. Google Artifact Registry
31. Operations Logging
32. GCP Monitoring

## What will students learn in your course?
- You will learn to master Kubernetes on Google GKE with 75 Real-world  demo's on Google Cloud Platform with 20+ Kubernetes and 30+ Google Cloud Services
- You will learn Kubernetes Basics for 4.5 hours
- You will create GKE Standard and Autopilot clusters with public and private networks
- You will learn to implement Kubernetes Storage with Google Persistent Disks and Google File Store
- You will also use Google Cloud SQL, Cloud Load Balancing to deploy a sample application outlining LB to DB usecase in GKE Cluster
- You will master Kubernetes Ingress concepts in detail on GKE with 22 Real-world Demos
- You will implement Ingress Context Path Routing and Name based vhost routing
- You will implement Ingress with Google Managed SSL Certificates
- You will master Google GKE Workload Identity with a detailed dedicated demo.
- You will implement External DNS Controller to automatically add, delete DNS records automatically in Google Cloud DNS Service
- You will implement Ingress with Preshared SSL and Self Signed Certificates
- You will implement Ingress with Cloud CDN, Cloud Armor, Internal Load Balancer, Cookie Affinity, IP Affinity, HTTP Access Logging.
- You will implement Ingress with Google Identity-Aware Proxy
- You will learn to use Google Artifact Registry with GKE
- You will implement DevOps Continuous Integration (CI) and Continuous Delivery (CD) with Cloud Build and Cloud Source Services
- You will learn to master Kubernetes Probes (Readiness, Startup, Liveness)
- You will implement Kubernetes Requests, Limits, Namespaces, Resource Quota and Limit Range
- You will implement GKE Cluster Autoscaler and Horizontal Pod Autoscaler

## What are the requirements or prerequisites for taking your course?
- You must have an Google Cloud account to follow with me for hands-on activities.
- You don't need to have any basic knowledge of Kubernetes. Course will get started from very very basics of Kubernetes and take you to very advanced levels
- Any Cloud Platform basics is required to understand the terminology

## Who is this course for?
- Infrastructure Architects or Sysadmins or Developers who are planning to master Kubernetes from Real-World perspective on Google Cloud Platform (GCP)
- Any beginner who is interested in learning Kubernetes with Google Cloud Platform (GCP)
- Any beginner who is planning their career in DevOps

## Github Repositories used for this course
- [Terraform on AWS EKS Kubernetes IaC SRE- 50 Real-World Demos](https://github.com/stacksimplify/terraform-on-aws-eks)
- [Course Presentation](https://github.com/stacksimplify/terraform-on-aws-eks/tree/main/course-presentation)
- [Kubernetes Fundamentals](https://github.com/stacksimplify/kubernetes-fundamentals)
- **Important Note:** Please go to these repositories and FORK these repositories and make use of them during the course.

## Each of my courses come with
- Amazing Hands-on Step By Step Learning Experiences
- Real Implementation Experience
- Friendly Support in the Q&A section
- "30-Day "No Questions Asked" Money Back Guaranteed by Udemy"

## My Other AWS Courses
- [Udemy Enroll](https://www.stacksimplify.com/azure-aks/courses/stacksimplify-best-selling-courses-on-udemy/)

## Stack Simplify Udemy Profile
- [Udemy Profile](https://www.udemy.com/user/kalyan-reddy-9/)

# HashiCorp Certified: Terraform Associate - 50 Practical Demos
[![Image](https://stacksimplify.com/course-images/hashicorp-certified-terraform-associate-highest-rated.png "HashiCorp Certified: Terraform Associate - 50 Practical Demos")](https://links.stacksimplify.com/hashicorp-certified-terraform-associate)

# AWS EKS - Elastic Kubernetes Service - Masterclass
[![Image](https://stacksimplify.com/course-images/AWS-EKS-Kubernetes-Masterclass-DevOps-Microservices-course.png "AWS EKS Kubernetes - Masterclass")](https://www.udemy.com/course/aws-eks-kubernetes-masterclass-devops-microservices/?referralCode=257C9AD5B5AF8D12D1E1)

# Azure Kubernetes Service with Azure DevOps and Terraform
[![Image](https://stacksimplify.com/course-images/azure-kubernetes-service-with-azure-devops-and-terraform.png "Azure Kubernetes Service with Azure DevOps and Terraform")](https://www.udemy.com/course/azure-kubernetes-service-with-azure-devops-and-terraform/?referralCode=2499BF7F5FAAA506ED42)

# Terraform on AWS with SRE & IaC DevOps | Real-World 20 Demos
[![Image](https://stacksimplify.com/course-images/terraform-on-aws-best-seller.png "Terraform on AWS with SRE & IaC DevOps | Real-World 20 Demos")](https://links.stacksimplify.com/terraform-on-aws-with-sre-and-iacdevops)

# Azure - HashiCorp Certified: Terraform Associate - 70 Demos
[![Image](https://stacksimplify.com/course-images/azure-hashicorp-certified-terraform-associate-highest-rated.png "Azure - HashiCorp Certified: Terraform Associate - 70 Demos")](https://links.stacksimplify.com/azure-hashicorp-certified-terraform-associate)

# Terraform on Azure with IaC DevOps and SRE | Real-World 25 Demos

[![Image](https://stacksimplify.com/course-images/terraform-on-azure-with-iac-azure-devops-sre-1.png "Terraform on Azure with IaC DevOps and SRE | Real-World 25 Demos")](https://links.stacksimplify.com/terraform-on-azure-with-iac-devops-sre)

# [Terraform on AWS EKS Kubernetes IaC SRE- 50 Real-World Demos](https://links.stacksimplify.com/terraform-on-aws-eks-kubernetes-iac-sre)

[![Image](https://stacksimplify.com/course-images/terraform-on-aws-eks-kubernetes.png "Terraform on AWS EKS Kubernetes IaC SRE- 50 Real-World Demos ")](https://links.stacksimplify.com/terraform-on-aws-eks-kubernetes-iac-sre)

GCP GKE Google Kubernetes Engine DevOps 75 Real World Demos  https   links stacksimplify com gcp google kubernetes engine gke with devops      Image  images course title png  Google Kubernetes Engine GKE with DevOps 75 Real World Demos    https   links stacksimplify com gcp google kubernetes engine gke with devops       Course Modules 01  Google Cloud Account Creation 02  Create GKE Standard Public Cluster     03  Install gcloud CLI on mac OS     04  Install gcloud CLI on Windows OS     05  Docker Fundamentals     06  Kubernetes Pods     07  Kubernetes ReplicaSets     08  Kubernetes Deployment   CREATE     09  Kubernetes Deployment   UPDATE     10  Kubernetes Deployment   ROLLBACK     11  Kubernetes Deployments   Pause and Resume     12  Kubernetes ClusterIP and Load Balancer Service     13  YAML Basics     14  Kubernetes Pod    Service using YAML     15  Kubernetes ReplicaSets using YAML     16  Kubernetes Deployment using YAML     17  Kubernetes Services using YAML     18   GKE Kubernetes NodePort Service     19  GKE Kubernetes Headless Service     20  GKE Private Cluster     21  How to use GCP Persistent Disks in GKE       22  How to use Balanced Persistent Disk in GKE       23  How to use Custom Storage Class in GKE for Persistent Disks       24  How to use Pre existing Persistent Disks in GKE       25  How to use Regional Persistent Disks in GKE       26  How to perform Persistent Disk  Volume Snapshots and Volume Restore       28  GKE Workloads and Cloud SQL with Public IP     29  GKE Workloads and Cloud SQL with Private IP     30  GKE Workloads and Cloud SQL with Private IP and No ExternalName Service     31  How to use Google Cloud File Store in GKE       32  How to use Custom Storage Class for File Store in GKE       33  How to perform File Store Instance Volume Snapshots and Volume Restore       34  Ingress Service Basics     35  Ingress Context Path based Routing     36  Ingress Custom Health Checks using Readiness Probes     37  Register a Google Cloud Domain for some advanced Ingress Service Demos      38  Ingress with Static External IP and Cloud DNS     39  Google Managed SSL Certificates for Ingress     40  Ingress HTTP to HTTPS Redirect     41  GKE Workload Identity     42  External DNS Controller Install     43  External DNS   Ingress Service     44  External DNS   Kubernetes Service     45  Ingress Name based Virtual Host Routing     46  Ingress SSL Policy     47  Ingress with Identity Aware Proxy     48  Ingress with Self Signed SSL Certificates     49  Ingress with Pre shared SSL Certificates     50  Ingress with Cloud CDN  HTTP Access Logging and Timeouts     51  Ingress with Client IP Affinity     52  Ingress with Cookie Affinity     53  Ingress with Custom Health Checks using BackendConfig CRD     54  Ingress Internal Load Balancer     55  Ingress with Google Cloud Armor     56  Google Artifact Registry     57  GKE Continuous Integration     58  GKE Continuous Delivery     59  Kubernetes Liveness Probes     60  Kubernetes Startup Probes     61  Kubernetes Readiness Probe     62  Kubernetes Requests and Limits     63  GKE Cluster Autoscaling     64  Kubernetes Namespaces     65  Kubernetes Namespaces Resource Quota     66  Kubernetes Namespaces Limit Range     67  Kubernetes Horizontal Pod Autoscaler     68  GKE Autopilot Cluster     69  How to manage Multiple Cluster access in kubeconfig              Kubernetes Concepts Covered 01  Kubernetes Deployments  Create  Update  Rollback  Pause  Resume  02  Kubernetes Pods 03  Kubernetes Service of Type LoadBalancer 04  Kubernetes Service of Type ClusterIP 05  Kubernetes Ingress Service 06  Kubernetes Storage Class 07  Kubernetes Storage Persistent Volume 08  Kubernetes Storage Persistent Volume Claim 09  Kubernetes Cluster Autoscaler 10  Kubernetes Horizontal Pod Autoscaler 11  Kubernetes Namespaces 12  Kubernetes Namespaces Resource Quota 13  Kubernetes Namespaces Limit Range 14  Kubernetes Service Accounts 15  Kubernetes ConfigMaps 16  Kubernetes Requests and Limits 17  Kubernetes Worker Nodes 18  Kubernetes Service of Type NodePort 19  Kubernetes Service of Type Headless 20  Kubernetes ReplicaSets     Google Services Covered 01  Google GKE Standard Cluster 02  Google GKE Autopilot Cluster 03  Compute Engine   Virtual Machines 04  Compute Engine   Storage Disks 05  Compute Engine   Storage Snapshots 06  Compute Engine   Storage Images 07  Compute Engine   Instance Groups 08  Compute Engine   Health Checks 09  Compute Engine   Network Endpoint Groups 10  VPC Networks   VPC 11  VPC Network   External and Internal IP Addresses 12  VPC Network   Firewall 13  Network Services   Load Balancing 14  Network Services   Cloud DNS 15  Network Services   Cloud CDN 16  Network Services   Cloud NAT 17  Network Services   Cloud Domains 18  Network Services   Private Service Connection 19  Network Security   Cloud Armor 20  Network Security   SSL Policies 21  IAM   Admin   IAM 22  IAM   Admin   Service Accounts 23  IAM   Admin   Roles 24  IAM   Admin   Identity Aware Proxy 25  DevOps   Cloud Source Repositories 26  DevOps   Cloud Build 27  DevOps   Cloud Storage 28  SQL   Cloud SQL 29  Storage   Filestore 30  Google Artifact Registry 31  Operations Logging 32  GCP Monitoring      What will students learn in your course    You will learn to master Kubernetes on Google GKE with 75 Real world  demo s on Google Cloud Platform with 20  Kubernetes and 30  Google Cloud Services   You will learn Kubernetes Basics for 4 5 hours   You will create GKE Standard and Autopilot clusters with public and private networks   You will learn to implement Kubernetes Storage with Google Persistent Disks and Google File Store   You will also use Google Cloud SQL  Cloud Load Balancing to deploy a sample application outlining LB to DB usecase in GKE Cluster   You will master Kubernetes Ingress concepts in detail on GKE with 22 Real world Demos   You will implement Ingress Context Path Routing and Name based vhost routing   You will implement Ingress with Google Managed SSL Certificates   You will master Google GKE Workload Identity with a detailed dedicated demo    You will implement External DNS Controller to automatically add  delete DNS records automatically in Google Cloud DNS Service   You will implement Ingress with Preshared SSL and Self Signed Certificates   You will implement Ingress with Cloud CDN  Cloud Armor  Internal Load Balancer  Cookie Affinity  IP Affinity  HTTP Access Logging    You will implement Ingress with Google Identity Aware Proxy   You will learn to use Google Artifact Registry with GKE   You will implement DevOps Continuous Integration  CI  and Continuous Delivery  CD  with Cloud Build and Cloud Source Services   You will learn to master Kubernetes Probes  Readiness  Startup  Liveness    You will implement Kubernetes Requests  Limits  Namespaces  Resource Quota and Limit Range   You will implement GKE Cluster Autoscaler and Horizontal Pod Autoscaler       What are the requirements or prerequisites for taking your course    You must have an Google Cloud account to follow with me for hands on activities    You don t need to have any basic knowledge of Kubernetes  Course will get started from very very basics of Kubernetes and take you to very advanced levels   Any Cloud Platform basics is required to understand the terminology     Who is this course for    Infrastructure Architects or Sysadmins or Developers who are planning to master Kubernetes from Real World perspective on Google Cloud Platform  GCP    Any beginner who is interested in learning Kubernetes with Google Cloud Platform  GCP     Any beginner who is planning their career in DevOps      Github Repositories used for this course    Terraform on AWS EKS Kubernetes IaC SRE  50 Real World Demos  https   github com stacksimplify terraform on aws eks     Course Presentation  https   github com stacksimplify terraform on aws eks tree main course presentation     Kubernetes Fundamentals  https   github com stacksimplify kubernetes fundamentals      Important Note    Please go to these repositories and FORK these repositories and make use of them during the course       Each of my courses come with   Amazing Hands on Step By Step Learning Experiences   Real Implementation Experience   Friendly Support in the Q A section    30 Day  No Questions Asked  Money Back Guaranteed by Udemy      My Other AWS Courses    Udemy Enroll  https   www stacksimplify com azure aks courses stacksimplify best selling courses on udemy       Stack Simplify Udemy Profile    Udemy Profile  https   www udemy com user kalyan reddy 9      HashiCorp Certified  Terraform Associate   50 Practical Demos    Image  https   stacksimplify com course images hashicorp certified terraform associate highest rated png  HashiCorp Certified  Terraform Associate   50 Practical Demos    https   links stacksimplify com hashicorp certified terraform associate      AWS EKS   Elastic Kubernetes Service   Masterclass    Image  https   stacksimplify com course images AWS EKS Kubernetes Masterclass DevOps Microservices course png  AWS EKS Kubernetes   Masterclass    https   www udemy com course aws eks kubernetes masterclass devops microservices  referralCode 257C9AD5B5AF8D12D1E1      Azure Kubernetes Service with Azure DevOps and Terraform     Image  https   stacksimplify com course images azure kubernetes service with azure devops and terraform png  Azure Kubernetes Service with Azure DevOps and Terraform    https   www udemy com course azure kubernetes service with azure devops and terraform  referralCode 2499BF7F5FAAA506ED42     Terraform on AWS with SRE   IaC DevOps   Real World 20 Demos    Image  https   stacksimplify com course images terraform on aws best seller png  Terraform on AWS with SRE   IaC DevOps   Real World 20 Demos    https   links stacksimplify com terraform on aws with sre and iacdevops     Azure   HashiCorp Certified  Terraform Associate   70 Demos    Image  https   stacksimplify com course images azure hashicorp certified terraform associate highest rated png  Azure   HashiCorp Certified  Terraform Associate   70 Demos    https   links stacksimplify com azure hashicorp certified terraform associate     Terraform on Azure with IaC DevOps and SRE   Real World 25 Demos     Image  https   stacksimplify com course images terraform on azure with iac azure devops sre 1 png  Terraform on Azure with IaC DevOps and SRE   Real World 25 Demos    https   links stacksimplify com terraform on azure with iac devops sre      Terraform on AWS EKS Kubernetes IaC SRE  50 Real World Demos  https   links stacksimplify com terraform on aws eks kubernetes iac sre      Image  https   stacksimplify com course images terraform on aws eks kubernetes png  Terraform on AWS EKS Kubernetes IaC SRE  50 Real World Demos     https   links stacksimplify com terraform on aws eks kubernetes iac sre


gcp gke docs Implement GCP Google Kubernetes Engine GKE Ingress Namebased Virtual Host Routing title GCP Google Kubernetes Engine GKE Ingress Namebased Virtual Host Routing Step 00 Pre requisites 2 Verify if kubeconfig for kubectl is configured in your local terminal Configure kubeconfig for kubectl 1 Verify if GKE Cluster is created gcloud container clusters get credentials CLUSTER NAME region REGION project PROJECT t

Answer:
---
title: GCP Google Kubernetes Engine GKE Ingress Namebased Virtual Host Routing
description: Implement GCP Google Kubernetes Engine GKE Ingress Namebased Virtual Host Routing
---
## Step-00: Pre-requisites
1. Verify if GKE Cluster is created
2. Verify if kubeconfig for kubectl is configured in your local terminal
```t
# Configure kubeconfig for kubectl
gcloud container clusters get-credentials <CLUSTER-NAME> --region <REGION> --project <PROJECT>

# Replace Values CLUSTER-NAME, REGION, PROJECT
gcloud container clusters get-credentials standard-cluster-private-1 --region us-central1 --project kdaida123
```
3. External DNS Controller Installed

## Step-01: Introduction
1. Requests will be routed in Load Balancer based on DNS Names
2. `app1-ingress.kalyanreddydaida.com` will send traffic to `App1 Pods`
3. `app2-ingress.kalyanreddydaida.com` will send traffic to `App2 Pods`
4. `default-ingress.kalyanreddydaida.com` will send traffic to `App3 Pods`

## Step-02: Review kube-manifests
1. 01-Nginx-App1-Deployment-and-NodePortService.yaml
2. 02-Nginx-App2-Deployment-and-NodePortService.yaml
3. 03-Nginx-App3-Deployment-and-NodePortService.yaml
4. NO CHANGES TO ABOVE 3 files - Standard Deployment and NodePort Service we are using from previous Context Path based Routing Demo

## Step-03: 04-Ingress-NameBasedVHost-Routing.yaml
```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-namebasedvhost-routing
  annotations:
    # External Load Balancer
    kubernetes.io/ingress.class: "gce"
    # Static IP for Ingress Service
    kubernetes.io/ingress.global-static-ip-name: "gke-ingress-extip1"
    # Google Managed SSL Certificates
    networking.gke.io/managed-certificates: managed-cert-for-ingress
    # SSL Redirect HTTP to HTTPS
    networking.gke.io/v1beta1.FrontendConfig: "my-frontend-config"
    # External DNS - For creating a Record Set in Google Cloud Cloud DNS
    external-dns.alpha.kubernetes.io/hostname: default-ingress.kalyanreddydaida.com
spec:
  defaultBackend:
    service:
      name: app3-nginx-nodeport-service
      port:
        number: 80
  rules:
    - host: app1-ingress.kalyanreddydaida.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: app1-nginx-nodeport-service
                port:
                  number: 80
    - host: app2-ingress.kalyanreddydaida.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: app2-nginx-nodeport-service
                port:
                  number: 80
```

## Step-04: 05-Managed-Certificate.yaml
```yaml
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
  name: managed-cert-for-ingress
spec:
  domains:
    - default101-ingress.kalyanreddydaida.com
    - app101-ingress.kalyanreddydaida.com
    - app201-ingress.kalyanreddydaida.com
```

## Step-05: 06-frontendconfig.yaml
```yaml
apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
metadata:
  name: my-frontend-config
spec:
  redirectToHttps:
    enabled: true
    #responseCodeName: RESPONSE_CODE
```

## Step-06: Deploy Kubernetes Manifests
```t
# Deploy Kubernetes Manifests
kubectl apply -f kube-manifests

# List Deployments
kubectl get deploy

# List Pods
kubectl get pods

# List Services
kubectl get svc

# List Ingress Services
kubectl get ingress

# Verify external-dns Controller logs
kubectl -n external-dns-ns logs -f $(kubectl -n external-dns-ns get po | egrep -o 'external-dns[A-Za-z0-9-]+')
[or]
kubectl -n external-dns-ns get pods
kubectl -n external-dns-ns logs -f <External-DNS-Pod-Name>

# Verify Cloud DNS
1. Go to Network Services -> Cloud DNS -> kalyanreddydaida-com
2. Verify Record sets, DNS Name we added in Ingress Service should be present

# List FrontendConfigs
kubectl get frontendconfig

# List Managed Certificates
kubectl get managedcertificate

# Describe Managed Certificates
kubectl describe managedcertificate managed-cert-for-ingress
Observation:
1. Wait for Domain Status to be changed from "Provisioning" to "ACTIVE"
2. It might take minimum 60 minutes for provisioning Google Managed SSL Certificates
```

## Step-07: Access Application
```t
# Access Application
http://app1-ingress.kalyanreddydaida.com/app1/index.html
http://app2-ingress.kalyanreddydaida.com/app2/index.html
http://default-ingress.kalyanreddydaida.com

Observation:
1. All 3 URLS should work as expected. In your case, replace YOUR_DOMAIN name for testing
2. HTTP to HTTPS redirect should work
```

## Step-08: Access Application - Negative usecase Testing
```t
# Access Application - App1 DNS Name
http://app1-ingress.kalyanreddydaida.com/app2/index.html
Observation: SHOULD FAIL In Pod App1 we don't app2 context path (app2 folder) - 404 ERROR

# Access Application - App2 DNS Name
http://app2-ingress.kalyanreddydaida.com/app1/index.html
Observation: SHOULD FAIL In Pod App2 we don't app1 context path (app1 folder) - 404 ERROR

# Access Application - App3 or Default DNS Name
http://default-ingress.kalyanreddydaida.com/app1/index.html
Observation: SHOULD FAIL In Pod App3 we don't app1 context path (app1 folder) - 404 ERROR
```

## Step-09: Clean-Up
- DONT DELETE, WE ARE GOING TO USE THESE KUBERNETES RESOURCES IN NEXT DEMO RELATED TO SSL-POLICY

## References
- [Ingress Features](https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features)

title  GCP Google Kubernetes Engine GKE Ingress Namebased Virtual Host Routing description  Implement GCP Google Kubernetes Engine GKE Ingress Namebased Virtual Host Routing        Step 00  Pre requisites 1  Verify if GKE Cluster is created 2  Verify if kubeconfig for kubectl is configured in your local terminal    t   Configure kubeconfig for kubectl gcloud container clusters get credentials  CLUSTER NAME    region  REGION    project  PROJECT     Replace Values CLUSTER NAME  REGION  PROJECT gcloud container clusters get credentials standard cluster private 1   region us central1   project kdaida123     3  External DNS Controller Installed     Step 01  Introduction 1  Requests will be routed in Load Balancer based on DNS Names 2   app1 ingress kalyanreddydaida com  will send traffic to  App1 Pods  3   app2 ingress kalyanreddydaida com  will send traffic to  App2 Pods  4   default ingress kalyanreddydaida com  will send traffic to  App3 Pods       Step 02  Review kube manifests 1  01 Nginx App1 Deployment and NodePortService yaml 2  02 Nginx App2 Deployment and NodePortService yaml 3  03 Nginx App3 Deployment and NodePortService yaml 4  NO CHANGES TO ABOVE 3 files   Standard Deployment and NodePort Service we are using from previous Context Path based Routing Demo      Step 03  04 Ingress NameBasedVHost Routing yaml    yaml apiVersion  networking k8s io v1 kind  Ingress metadata    name  ingress namebasedvhost routing   annotations        External Load Balancer     kubernetes io ingress class   gce          Static IP for Ingress Service     kubernetes io ingress global static ip name   gke ingress extip1           Google Managed SSL Certificates     networking gke io managed certificates  managed cert for ingress       SSL Redirect HTTP to HTTPS     networking gke io v1beta1 FrontendConfig   my frontend config           External DNS   For creating a Record Set in Google Cloud Cloud DNS     external dns alpha kubernetes io hostname  default ingress kalyanreddydaida com spec              defaultBackend      service        name  app3 nginx nodeport service       port          number  80        rules        host  app1 ingress kalyanreddydaida com       http          paths              path                pathType  Prefix             backend                service                  name  app1 nginx nodeport service                 port                     number  80       host  app2 ingress kalyanreddydaida com       http          paths                                path                pathType  Prefix             backend                service                  name  app2 nginx nodeport service                 port                     number  80         Step 04  05 Managed Certificate yaml    yaml apiVersion  networking gke io v1 kind  ManagedCertificate metadata    name  managed cert for ingress spec    domains        default101 ingress kalyanreddydaida com       app101 ingress kalyanreddydaida com       app201 ingress kalyanreddydaida com         Step 05  06 frontendconfig yaml    yaml apiVersion  networking gke io v1beta1 kind  FrontendConfig metadata    name  my frontend config spec    redirectToHttps      enabled  true      responseCodeName  RESPONSE CODE         Step 06  Deploy Kubernetes Manifests    t   Deploy Kubernetes Manifests kubectl apply  f kube manifests    List Deployments kubectl get deploy    List Pods kubectl get pods    List Services kubectl get svc    List Ingress Services kubectl get ingress    Verify external dns Controller logs kubectl  n external dns ns logs  f   kubectl  n external dns ns get po   egrep  o  external dns A Za z0 9       or  kubectl  n external dns ns get pods kubectl  n external dns ns logs  f  External DNS Pod Name     Verify Cloud DNS 1  Go to Network Services    Cloud DNS    kalyanreddydaida com 2  Verify Record sets  DNS Name we added in Ingress Service should be present     List FrontendConfigs kubectl get frontendconfig    List Managed Certificates kubectl get managedcertificate    Describe Managed Certificates kubectl describe managedcertificate managed cert for ingress Observation  1  Wait for Domain Status to be changed from  Provisioning  to  ACTIVE  2  It might take minimum 60 minutes for provisioning Google Managed SSL Certificates         Step 07  Access Application    t   Access Application http   app1 ingress kalyanreddydaida com app1 index html http   app2 ingress kalyanreddydaida com app2 index html http   default ingress kalyanreddydaida com  Observation  1  All 3 URLS should work as expected  In your case  replace YOUR DOMAIN name for testing 2  HTTP to HTTPS redirect should work         Step 08  Access Application   Negative usecase Testing    t   Access Application   App1 DNS Name http   app1 ingress kalyanreddydaida com app2 index html    Observation  SHOULD FAIL In Pod App1 we don t app2 context path  app2 folder    404 ERROR    Access Application   App2 DNS Name http   app2 ingress kalyanreddydaida com app1 index html Observation  SHOULD FAIL In Pod App2 we don t app1 context path  app1 folder    404 ERROR    Access Application   App3 or Default DNS Name http   default ingress kalyanreddydaida com app1 index html Observation  SHOULD FAIL In Pod App3 we don t app1 context path  app1 folder    404 ERROR         Step 09  Clean Up   DONT DELETE  WE ARE GOING TO USE THESE KUBERNETES RESOURCES IN NEXT DEMO RELATED TO SSL POLICY     References    Ingress Features  https   cloud google com kubernetes engine docs how to ingress features


gcp gke docs Implement GCP Google Kubernetes Engine GKE Autopilot Cluster Create GKE Autopilot Cluster Understand in detail about GKE Autopilot cluster title GCP Google Kubernetes Engine Autopilot Cluster Step 02 Pre requisite Verify if Cloud NAT Gateway created Step 01 Introduction

Answer:
---
title: GCP Google Kubernetes Engine Autopilot Cluster
description: Implement GCP Google Kubernetes Engine GKE Autopilot Cluster
---

## Step-01: Introduction
- Create GKE Autopilot Cluster
- Understand in detail about GKE Autopilot cluster

## Step-02: Pre-requisite: Verify if Cloud NAT Gateway created
- Verify if Cloud NAT Gateway created in `Region:us-central1` where you are planning to create GKE Autopilot Private Cluster
- This is required for Workload in Private subnets to connect to Internet.
- Primarily to Connect to Docker Hub to pull the Docker Images
- Go to Network Services -> Cloud NAT

## Step-03: Create GKE Autopilot Private Cluster
- Go to Kubernetes Engine -> Clusters -> **CREATE**
- Create Cluster -> GKE Autopilot -> **CONFIGURE**
- **Name:** autopilot-cluster-private-1
- **Region:** us-central1
- **Network access:** Private Cluster
- **Access control plane using its external IP address:** CHECK
- **Control plane ip range:** 172.18.0.0/28
- **Enable control plane authorized networks:** CHECK
- **Authorized networks:**
  - **Name:** internet-access
  - **Network:** 0.0.0.0/0
  - Click on **DONE**
- **Network:** default  (LEAVE TO DEFAULTS)
- **Node subnet:** default (LEAVE TO DEFAULTS)
- **Cluster default pod address range:** /17 (LEAVE TO DEFAULTS)
- **Service Address range:** /22 (LEAVE TO DEFAULTS)
- **Release Channel:** Regular Channel (Default)
- REST ALL LEAVE TO DEFAULTS
- Click on **CREATE**

## Step-04: Configure kubectl for kubeconfig
```t
# Configure kubectl for kubeconfig
gcloud container clusters get-credentials CLUSTER-NAME --region REGION --project PROJECT-NAME

# Replace values CLUSTER-NAME, REGION, PROJECT-NAME
gcloud container clusters get-credentials autopilot-cluster-private-1 --region us-central1 --project kdaida123

# List Kubernetes Nodes
kubectl get nodes
kubectl get nodes -o wide
```

## Step-05: Review Kubernetes Manifests
### Step-05-01: 01-kubernetes-deployment.yaml
```yaml
apiVersion: apps/v1
kind: Deployment
metadata: #Dictionary
  name: myapp1-deployment
spec: # Dictionary
  replicas: 5
  selector:
    matchLabels:
      app: myapp1
  template:
    metadata: # Dictionary
      name: myapp1-pod
      labels: # Dictionary
        app: myapp1  # Key value pairs
    spec:
      containers: # List
        - name: myapp1-container
          image: stacksimplify/kubenginx:1.0.0
          ports:
            - containerPort: 80
          resources:
            requests:
              memory: "128Mi" # 128 MebiByte is equal to 135 Megabyte (MB)
              cpu: "200m" # `m` means milliCPU
            limits:
              memory: "256Mi"
              cpu: "400m"  # 1000m is equal to 1 VCPU core
```
### Step-05-02: 02-kubernetes-loadbalancer-service.yaml
```yaml
apiVersion: v1
kind: Service
metadata:
  name: myapp1-lb-service
spec:
  type: LoadBalancer # ClusterIp, # NodePort
  selector:
    app: myapp1
  ports:
    - name: http
      port: 80 # Service Port
      targetPort: 80 # Container Port
```

## Step-06: Deploy Kubernetes Manifests
```t
# Deploy Kubernetes Manifests
kubectl apply -f kube-manifests

# List Deployments
kubectl get deploy

# List Pods
kubectl get pods

# List Services
kubectl get svc

# Access Application
http://<EXTERNAL-IP-OF-GET-SERVICE-OUTPUT>
```

## Step-07: Scale your Application
```t
# Scale your Application
kubectl scale --replicas=15 deployment/myapp1-deployment

# List Pods
kubectl get pods

# List Nodes
kubectl get nodes
```

## Step-08: Clean-Up
```t
# Delete Kubernetes Resources
kubectl delete -f kube-manifests

# Delete GKE Autopilot Cluster
# NOTE: Dont delete this cluster, as we are going to use this in next demo.
Go to Kubernetes Engine > Clusters -> autopilot-cluster-private-1 -> DELETE
```

## References
- https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview#default_container_resource_requests
- https://cloud.google.com/kubernetes-engine/quotas#limits_per_cluste

title  GCP Google Kubernetes Engine Autopilot Cluster description  Implement GCP Google Kubernetes Engine GKE Autopilot Cluster         Step 01  Introduction   Create GKE Autopilot Cluster   Understand in detail about GKE Autopilot cluster     Step 02  Pre requisite  Verify if Cloud NAT Gateway created    Verify if Cloud NAT Gateway created in  Region us central1  where you are planning to create GKE Autopilot Private Cluster   This is required for Workload in Private subnets to connect to Internet      Primarily to Connect to Docker Hub to pull the Docker Images   Go to Network Services    Cloud NAT     Step 03  Create GKE Autopilot Private Cluster   Go to Kubernetes Engine    Clusters      CREATE     Create Cluster    GKE Autopilot      CONFIGURE       Name    autopilot cluster private 1     Region    us central1     Network access    Private Cluster     Access control plane using its external IP address    CHECK     Control plane ip range    172 18 0 0 28     Enable control plane authorized networks    CHECK     Authorized networks           Name    internet access       Network    0 0 0 0 0     Click on   DONE       Network    default   LEAVE TO DEFAULTS      Node subnet    default  LEAVE TO DEFAULTS      Cluster default pod address range     17  LEAVE TO DEFAULTS      Service Address range     22  LEAVE TO DEFAULTS      Release Channel    Regular Channel  Default    REST ALL LEAVE TO DEFAULTS   Click on   CREATE        Step 04  Configure kubectl for kubeconfig    t   Configure kubectl for kubeconfig gcloud container clusters get credentials CLUSTER NAME   region REGION   project PROJECT NAME    Replace values CLUSTER NAME  REGION  PROJECT NAME gcloud container clusters get credentials autopilot cluster private 1   region us central1   project kdaida123    List Kubernetes Nodes kubectl get nodes kubectl get nodes  o wide         Step 05  Review Kubernetes Manifests     Step 05 01  01 kubernetes deployment yaml    yaml apiVersion  apps v1 kind  Deployment  metadata   Dictionary   name  myapp1 deployment spec    Dictionary   replicas  5    selector      matchLabels        app  myapp1   template        metadata    Dictionary       name  myapp1 pod       labels    Dictionary         app  myapp1    Key value pairs     spec        containers    List           name  myapp1 container           image  stacksimplify kubenginx 1 0 0           ports                 containerPort  80             resources              requests                memory   128Mi    128 MebiByte is equal to 135 Megabyte  MB                cpu   200m     m  means milliCPU             limits                memory   256Mi                cpu   400m     1000m is equal to 1 VCPU core                                    Step 05 02  02 kubernetes loadbalancer service yaml    yaml apiVersion  v1 kind  Service  metadata    name  myapp1 lb service spec    type  LoadBalancer   ClusterIp    NodePort   selector      app  myapp1   ports         name  http       port  80   Service Port       targetPort  80   Container Port         Step 06  Deploy Kubernetes Manifests    t   Deploy Kubernetes Manifests kubectl apply  f kube manifests    List Deployments kubectl get deploy    List Pods kubectl get pods    List Services kubectl get svc    Access Application http    EXTERNAL IP OF GET SERVICE OUTPUT          Step 07  Scale your Application    t   Scale your Application kubectl scale   replicas 15 deployment myapp1 deployment    List Pods kubectl get pods    List Nodes kubectl get nodes         Step 08  Clean Up    t   Delete Kubernetes Resources kubectl delete  f kube manifests    Delete GKE Autopilot Cluster    NOTE  Dont delete this cluster  as we are going to use this in next demo  Go to Kubernetes Engine   Clusters    autopilot cluster private 1    DELETE          References   https   cloud google com kubernetes engine docs concepts autopilot overview default container resource requests   https   cloud google com kubernetes engine quotas limits per cluste


gcp gke docs title GCP Google Kubernetes Engine GKE Service with External DNS gcloud container clusters get credentials CLUSTER NAME region REGION project PROJECT Step 00 Pre requisites 2 Verify if kubeconfig for kubectl is configured in your local terminal Configure kubeconfig for kubectl 1 Verify if GKE Cluster is created Implement GCP Google Kubernetes Engine GKE Service with External DNS t

Answer:
---
title: GCP Google Kubernetes Engine GKE Service with External DNS
description: Implement GCP Google Kubernetes Engine GKE Service with External DNS
---
## Step-00: Pre-requisites
1. Verify if GKE Cluster is created
2. Verify if kubeconfig for kubectl is configured in your local terminal
```t
# Configure kubeconfig for kubectl
gcloud container clusters get-credentials <CLUSTER-NAME> --region <REGION> --project <PROJECT>

# Replace Values CLUSTER-NAME, REGION, PROJECT
gcloud container clusters get-credentials standard-cluster-private-1 --region us-central1 --project kdaida123
```
3. External DNS Controller Installed

## Step-01: Introduction
- Kubernetes Service of Type Load Balancer with External DNS
- We are going to use the Annotation `external-dns.alpha.kubernetes.io/hostname` in Kubernetes Service.
- DNS Recordsets will be automatically added to Google Cloud DNS using external-dns controller when Ingress Service deployed

## Step-02: 01-kubernetes-deployment.yaml
```yaml
apiVersion: apps/v1
kind: Deployment
metadata: #Dictionary
  name: myapp1-deployment
spec: # Dictionary
  replicas: 2
  selector:
    matchLabels:
      app: myapp1
  template:
    metadata: # Dictionary
      name: myapp1-pod
      labels: # Dictionary
        app: myapp1  # Key value pairs
    spec:
      containers: # List
        - name: myapp1-container
          image: stacksimplify/kubenginx:1.0.0
          ports:
            - containerPort: 80
```

## Step-03: 02-kubernetes-loadbalancer-service.yaml
```yaml
apiVersion: v1
kind: Service
metadata:
  name: myapp1-lb-service
  annotations:
    # External DNS - For creating a Record Set in Google Cloud Cloud DNS
    external-dns.alpha.kubernetes.io/hostname: extdns-k8s-svc-demo.kalyanreddydaida.com
spec:
  type: LoadBalancer # ClusterIp, # NodePort
  selector:
    app: myapp1
  ports:
    - name: http
      port: 80 # Service Port
      targetPort: 80 # Container Port
```

## Step-05: Deploy Kubernetes Manifests
```t
# Deploy Kubernetes Manifests
kubectl apply -f kube-manifests

# List Deployments
kubectl get deploy

# List Pods
kubectl get pods

# List Services
kubectl get svc

# Verify external-dns Controller logs
kubectl -n external-dns-ns logs -f $(kubectl -n external-dns-ns get po | egrep -o 'external-dns[A-Za-z0-9-]+')
[or]
kubectl -n external-dns-ns get pods
kubectl -n external-dns-ns logs -f <External-DNS-Pod-Name>

# Verify Cloud DNS
1. Go to Network Services -> Cloud DNS -> kalyanreddydaida-com
2. Verify Record sets, DNS Name we added in Kubernetes Service should be present

# Access Application
http://<DNS-Name>
http://extdns-k8s-svc-demo.kalyanreddydaida.com
```

## Step-06: Delete kube-manifests
```t
# Delete Kubernetes Objects
kubectl delete -f kube-manifests/

# Verify external-dns Controller logs
kubectl -n external-dns-ns logs -f $(kubectl -n external-dns-ns get po | egrep -o 'external-dns[A-Za-z0-9-]+')
[or]
kubectl -n external-dns-ns get pods
kubectl -n external-dns-ns logs -f <External-DNS-Pod-Name>

# Verify Cloud DNS
1. Go to Network Services -> Cloud DNS -> kalyanreddydaida-com
2. Verify Record sets, DNS Name we added in Kubernetes Service should be not preset (already deleted)
```

title  GCP Google Kubernetes Engine GKE Service with External DNS  description  Implement GCP Google Kubernetes Engine GKE Service with External DNS        Step 00  Pre requisites 1  Verify if GKE Cluster is created 2  Verify if kubeconfig for kubectl is configured in your local terminal    t   Configure kubeconfig for kubectl gcloud container clusters get credentials  CLUSTER NAME    region  REGION    project  PROJECT     Replace Values CLUSTER NAME  REGION  PROJECT gcloud container clusters get credentials standard cluster private 1   region us central1   project kdaida123     3  External DNS Controller Installed     Step 01  Introduction   Kubernetes Service of Type Load Balancer with External DNS   We are going to use the Annotation  external dns alpha kubernetes io hostname  in Kubernetes Service    DNS Recordsets will be automatically added to Google Cloud DNS using external dns controller when Ingress Service deployed     Step 02  01 kubernetes deployment yaml    yaml apiVersion  apps v1 kind  Deployment  metadata   Dictionary   name  myapp1 deployment spec    Dictionary   replicas  2   selector      matchLabels        app  myapp1   template        metadata    Dictionary       name  myapp1 pod       labels    Dictionary         app  myapp1    Key value pairs     spec        containers    List           name  myapp1 container           image  stacksimplify kubenginx 1 0 0           ports                 containerPort  80               Step 03  02 kubernetes loadbalancer service yaml    yaml apiVersion  v1 kind  Service  metadata    name  myapp1 lb service   annotations        External DNS   For creating a Record Set in Google Cloud Cloud DNS     external dns alpha kubernetes io hostname  extdns k8s svc demo kalyanreddydaida com spec    type  LoadBalancer   ClusterIp    NodePort   selector      app  myapp1   ports         name  http       port  80   Service Port       targetPort  80   Container Port         Step 05  Deploy Kubernetes Manifests    t   Deploy Kubernetes Manifests kubectl apply  f kube manifests    List Deployments kubectl get deploy     List Pods kubectl get pods    List Services kubectl get svc    Verify external dns Controller logs kubectl  n external dns ns logs  f   kubectl  n external dns ns get po   egrep  o  external dns A Za z0 9       or  kubectl  n external dns ns get pods kubectl  n external dns ns logs  f  External DNS Pod Name     Verify Cloud DNS 1  Go to Network Services    Cloud DNS    kalyanreddydaida com 2  Verify Record sets  DNS Name we added in Kubernetes Service should be present     Access Application http    DNS Name  http   extdns k8s svc demo kalyanreddydaida com          Step 06  Delete kube manifests    t   Delete Kubernetes Objects kubectl delete  f kube manifests     Verify external dns Controller logs kubectl  n external dns ns logs  f   kubectl  n external dns ns get po   egrep  o  external dns A Za z0 9       or  kubectl  n external dns ns get pods kubectl  n external dns ns logs  f  External DNS Pod Name      Verify Cloud DNS 1  Go to Network Services    Cloud DNS    kalyanreddydaida com 2  Verify Record sets  DNS Name we added in Kubernetes Service should be not preset  already deleted


gcp gke docs Use GCP File Store for GKE Workloads Implement Backup and Restore title GKE Storage with GCP File Store Backup and Restore Step 00 Pre requisites 2 Verify if kubeconfig for kubectl is configured in your local terminal Configure kubeconfig for kubectl 1 Verify if GKE Cluster is created t

Answer:
---
title: GKE Storage with GCP File Store - Backup and Restore
description: Use GCP File Store for GKE Workloads - Implement Backup and Restore
---

## Step-00: Pre-requisites
1. Verify if GKE Cluster is created
2. Verify if kubeconfig for kubectl is configured in your local terminal
```t
# Configure kubeconfig for kubectl
gcloud container clusters get-credentials <CLUSTER-NAME> --region <REGION> --project <PROJECT>

# Replace Values CLUSTER-NAME, ZONE, PROJECT
gcloud container clusters get-credentials standard-cluster-private-1 --region us-central1 --project kdaida123
```

## Step-01: Introduction
- GKE Storage with GCP File Store
- Implement Backups is `VolumeSnapshotClass` and `VolumeSnapshot`
- Implement Restore of FileStore in myapp2 Application and Verify

## Step-02: YAML files are same as first FileStore Demo
- **Project Folder:** 01-myapp1-kube-manifests
- YAML files are same as first FileStore Demo
- 01-filestore-pvc.yaml
- 02-write-to-filestore-pod.yaml
- 03-myapp1-deployment.yaml
- 04-loadBalancer-service.yaml

## Step-03: Deploy 01-myapp1-kube-manifests and Verify
```t
# Deploy 01-myapp1-kube-manifests
kubectl apply -f 01-myapp1-kube-manifests

# List Storage Class
kubectl get sc

# List PVC
kubectl get pvc

# List PV
kubectl get pv

# List Pods
kubectl get pods
```

## Step-04: Verify GCP Cloud FileStore Instance
- Go to FileStore -> Instances
- Click on **Instance ID: pvc-27cd5c27-0ed0-48d1-bc5f-925adfb8495f**
- **Note:** Instance ID dynamically generated, it can be different in your case starting with pvc-*

## Step-05: Connect to filestore write app Kubernetes pods and Verify
```t
# FileStore write app - Connect to Kubernetes Pod
kubectl exec --stdin --tty <POD-NAME> -- /bin/sh
kubectl exec --stdin --tty filestore-writer-app  -- /bin/sh
cd /data
ls
tail -f myapp1.txt
exit
```

## Step-06: Connect to myapp1 Kubernetes pods and Verify
```t
# List Pods
kubectl get pods

# myapp1 POD1 - Connect to Kubernetes Pod
kubectl exec --stdin --tty <POD-NAME> -- /bin/sh
kubectl exec --stdin --tty myapp1-deployment-5d469f6478-2kp97 -- /bin/sh
cd /usr/share/nginx/html/filestore
ls
tail -f myapp1.txt
exit

# myapp1 POD2 - Connect to Kubernetes Pod
kubectl exec --stdin --tty <POD-NAME> -- /bin/sh
kubectl exec --stdin --tty myapp1-deployment-5d469f6478-2kp97  -- /bin/sh
cd /usr/share/nginx/html/filestore
ls
tail -f myapp1.txt
exit
```

## Step-07: Access Application
```t
# List Services
kubectl get svc

# myapp1 - Access Application
http://<EXTERNAL-IP-OF-GET-SERVICE-OUTPUT>/filestore/myapp1.txt
http://35.232.145.61/filestore/myapp1.txt
curl http://35.232.145.61/filestore/myapp1.txt
```

## Step-08: Volume Backup: 01-VolumeSnapshotClass.yaml
- **Project Folder:** 02-volume-backup-kube-manifests
```yaml
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: csi-gcp-filestore-backup-snap-class
driver: filestore.csi.storage.gke.io
parameters:
  type: backup
deletionPolicy: Delete
```

## Step-09: Volume Backup: 02-VolumeSnapshot.yaml
- **Project Folder:** 02-volume-backup-kube-manifests
```yaml
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: myapp1-volume-snapshot
spec:
  volumeSnapshotClassName: csi-gcp-filestore-backup-snap-class
  source:
    persistentVolumeClaimName: gke-filestore-pvc
```

## Step-10: Volume Backup: Deploy 02-volume-backup-kube-manifests and Verify
```t
# Deploy 02-volume-backup-kube-manifests
kubectl apply -f 02-volume-backup-kube-manifests

# List VolumeSnapshotClass
kubectl get volumesnapshotclass

# Describe VolumeSnapshotClass
kubectl describe volumesnapshotclass csi-gcp-filestore-backup-snap-class

# List VolumeSnapshot
kubectl get volumesnapshot

# Describe VolumeSnapshot
kubectl describe volumesnapshot myapp1-volume-snapshot
```

## Step-11: Volume Backup: Verify GCP Cloud FileStore Backups
- Go to FileStore -> Backups
- Observation: You should find the Backup with name `snapshot-<SOME-ID>` (Example: snapshot-b4f24bd7-649b-45bb-8a0a-2b09d5b0e631)

## Step-12: Volume Restore: 01-filestore-pvc.yaml
- **Project Folder:** 03-volume-restore-myapp2-kube-manifests
```yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: restored-filestore-pvc
spec:
  accessModes:
  - ReadWriteMany
  storageClassName: standard-rwx
  resources:
    requests:
      storage: 1Ti
  dataSource:
    kind: VolumeSnapshot
    name: myapp1-volume-snapshot
    apiGroup: snapshot.storage.k8s.io
```

## Step-13: Volume Restore: 02-myapp2-deployment.yaml
- **Project Folder:** 03-volume-restore-myapp2-kube-manifests
```yaml
apiVersion: apps/v1
kind: Deployment
metadata: #Dictionary
  name: myapp2-deployment
spec: # Dictionary
  replicas: 2
  selector:
    matchLabels:
      app: myapp2
  template:
    metadata: # Dictionary
      name: myapp2-pod
      labels: # Dictionary
        app: myapp2  # Key value pairs
    spec:
      containers: # List
        - name: myapp2-container
          image: stacksimplify/kubenginx:1.0.0
          ports:
            - containerPort: 80
          volumeMounts:
            - name: persistent-storage
              mountPath: /usr/share/nginx/html/filestore
      volumes:
        - name: persistent-storage
          persistentVolumeClaim:
            claimName: restored-filestore-pvc
```

## Step-14: Volume Restore: 03-myapp2-loadBalancer-service.yaml
- **Project Folder:** 03-volume-restore-myapp2-kube-manifests
```yaml
apiVersion: v1
kind: Service
metadata:
  name: myapp2-lb-service
spec:
  type: LoadBalancer # ClusterIp, # NodePort
  selector:
    app: myapp2
  ports:
    - name: http
      port: 80 # Service Port
      targetPort: 80 # Container Port
```

## Step-13: Volume Restore: Deploy 03-volume-restore-myapp2-kube-manifests and Verify
```t
# Deploy 03-volume-restore-myapp2-kube-manifests
kubectl apply -f 03-volume-restore-myapp2-kube-manifests

# List Storage Class
kubectl get sc

# List PVC
kubectl get pvc

# List PV
kubectl get pv

# List Pods
kubectl get pods

# Verify if new FileStore Instance is Created
Go to -> FileStore -> Instances
```

## Step-14: Volume Restore: Connect to myapp2 Kubernetes pods and Verify
```t
# List Pods
kubectl get pods

# myapp1 POD1 - Connect to Kubernetes Pod
kubectl exec --stdin --tty <POD-NAME> -- /bin/sh
kubectl exec --stdin --tty myapp2-deployment-6dccd6557-9x6dn -- /bin/sh
cd /usr/share/nginx/html/filestore
ls
tail -f myapp1.txt
exit

# myapp1 POD2 - Connect to Kubernetes Pod
kubectl exec --stdin --tty <POD-NAME> -- /bin/sh
kubectl exec --stdin --tty myapp2-deployment-6dccd6557-mbbjm  -- /bin/sh
cd /usr/share/nginx/html/filestore
ls
tail -f myapp1.txt
exit
```

## Step-15: Volume Restore: Access Applications
```t
# List Services
kubectl get svc

# myapp1 - Access Application
http://<MYAPP1-EXTERNAL-IP-OF-GET-SERVICE-OUTPUT>/filestore/myapp1.txt
http://35.232.145.61/filestore/myapp1.txt

# myapp2 - Access Application
http://<MYAPP2-EXTERNAL-IP-OF-GET-SERVICE-OUTPUT>/filestore/myapp1.txt
http://34.71.145.41/filestore/myapp1.txt

OBSERVATION:
1. For MyApp1, writer app is writing to FileStore so we get latest timestamp lines (many lines and file growing)
2. For MyApp2, we have restored it from backup, which means the number of lines present in file at the time of snapshot will be only displayed.
3. KEY here is we are able to successfully use the filestore backup for our Kubernetes Workloads
```

## Step-16: Clean-Up
```t
# Delete Kubernetes Objects
kubectl delete -f 01-myapp1-kube-manifests -f 02-volume-backup-kube-manifests -f 03-volume-restore-myapp2-kube-manifests

# Verify if two FileStore Instances are deleted
Go to -> FileStore -> Instances

# Verify if FileStore Backup is deleted
Go to -> FileStore -> Backups
``

title  GKE Storage with GCP File Store   Backup and Restore description  Use GCP File Store for GKE Workloads   Implement Backup and Restore         Step 00  Pre requisites 1  Verify if GKE Cluster is created 2  Verify if kubeconfig for kubectl is configured in your local terminal    t   Configure kubeconfig for kubectl gcloud container clusters get credentials  CLUSTER NAME    region  REGION    project  PROJECT     Replace Values CLUSTER NAME  ZONE  PROJECT gcloud container clusters get credentials standard cluster private 1   region us central1   project kdaida123         Step 01  Introduction   GKE Storage with GCP File Store    Implement Backups is  VolumeSnapshotClass  and  VolumeSnapshot    Implement Restore of FileStore in myapp2 Application and Verify      Step 02  YAML files are same as first FileStore Demo     Project Folder    01 myapp1 kube manifests   YAML files are same as first FileStore Demo   01 filestore pvc yaml   02 write to filestore pod yaml   03 myapp1 deployment yaml   04 loadBalancer service yaml     Step 03  Deploy 01 myapp1 kube manifests and Verify    t   Deploy 01 myapp1 kube manifests kubectl apply  f 01 myapp1 kube manifests    List Storage Class kubectl get sc    List PVC kubectl get pvc    List PV kubectl get pv    List Pods kubectl get pods          Step 04  Verify GCP Cloud FileStore Instance   Go to FileStore    Instances   Click on   Instance ID  pvc 27cd5c27 0ed0 48d1 bc5f 925adfb8495f       Note    Instance ID dynamically generated  it can be different in your case starting with pvc       Step 05  Connect to filestore write app Kubernetes pods and Verify    t   FileStore write app   Connect to Kubernetes Pod kubectl exec   stdin   tty  POD NAME      bin sh kubectl exec   stdin   tty filestore writer app      bin sh cd  data ls tail  f myapp1 txt exit         Step 06  Connect to myapp1 Kubernetes pods and Verify    t   List Pods kubectl get pods     myapp1 POD1   Connect to Kubernetes Pod kubectl exec   stdin   tty  POD NAME      bin sh kubectl exec   stdin   tty myapp1 deployment 5d469f6478 2kp97     bin sh cd  usr share nginx html filestore ls tail  f myapp1 txt exit    myapp1 POD2   Connect to Kubernetes Pod kubectl exec   stdin   tty  POD NAME      bin sh kubectl exec   stdin   tty myapp1 deployment 5d469f6478 2kp97      bin sh cd  usr share nginx html filestore ls tail  f myapp1 txt exit         Step 07  Access Application    t   List Services kubectl get svc    myapp1   Access Application http    EXTERNAL IP OF GET SERVICE OUTPUT  filestore myapp1 txt http   35 232 145 61 filestore myapp1 txt curl http   35 232 145 61 filestore myapp1 txt          Step 08  Volume Backup  01 VolumeSnapshotClass yaml     Project Folder    02 volume backup kube manifests    yaml apiVersion  snapshot storage k8s io v1 kind  VolumeSnapshotClass metadata    name  csi gcp filestore backup snap class driver  filestore csi storage gke io parameters    type  backup deletionPolicy  Delete         Step 09  Volume Backup  02 VolumeSnapshot yaml     Project Folder    02 volume backup kube manifests    yaml apiVersion  snapshot storage k8s io v1 kind  VolumeSnapshot metadata    name  myapp1 volume snapshot spec    volumeSnapshotClassName  csi gcp filestore backup snap class   source      persistentVolumeClaimName  gke filestore pvc         Step 10  Volume Backup  Deploy 02 volume backup kube manifests and Verify    t   Deploy 02 volume backup kube manifests kubectl apply  f 02 volume backup kube manifests    List VolumeSnapshotClass kubectl get volumesnapshotclass    Describe VolumeSnapshotClass kubectl describe volumesnapshotclass csi gcp filestore backup snap class    List VolumeSnapshot kubectl get volumesnapshot    Describe VolumeSnapshot kubectl describe volumesnapshot myapp1 volume snapshot         Step 11  Volume Backup  Verify GCP Cloud FileStore Backups   Go to FileStore    Backups   Observation  You should find the Backup with name  snapshot  SOME ID    Example  snapshot b4f24bd7 649b 45bb 8a0a 2b09d5b0e631      Step 12  Volume Restore  01 filestore pvc yaml     Project Folder    03 volume restore myapp2 kube manifests    yaml kind  PersistentVolumeClaim apiVersion  v1 metadata    name  restored filestore pvc spec    accessModes      ReadWriteMany   storageClassName  standard rwx   resources      requests        storage  1Ti   dataSource      kind  VolumeSnapshot     name  myapp1 volume snapshot     apiGroup  snapshot storage k8s io               Step 13  Volume Restore  02 myapp2 deployment yaml     Project Folder    03 volume restore myapp2 kube manifests    yaml apiVersion  apps v1 kind  Deployment  metadata   Dictionary   name  myapp2 deployment spec    Dictionary   replicas  2   selector      matchLabels        app  myapp2   template        metadata    Dictionary       name  myapp2 pod       labels    Dictionary         app  myapp2    Key value pairs     spec        containers    List           name  myapp2 container           image  stacksimplify kubenginx 1 0 0           ports                 containerPort  80             volumeMounts                name  persistent storage               mountPath   usr share nginx html filestore       volumes            name  persistent storage           persistentVolumeClaim              claimName  restored filestore pvc             Step 14  Volume Restore  03 myapp2 loadBalancer service yaml     Project Folder    03 volume restore myapp2 kube manifests    yaml apiVersion  v1 kind  Service  metadata    name  myapp2 lb service spec    type  LoadBalancer   ClusterIp    NodePort   selector      app  myapp2   ports         name  http       port  80   Service Port       targetPort  80   Container Port         Step 13  Volume Restore  Deploy 03 volume restore myapp2 kube manifests and Verify    t   Deploy 03 volume restore myapp2 kube manifests kubectl apply  f 03 volume restore myapp2 kube manifests    List Storage Class kubectl get sc    List PVC kubectl get pvc    List PV kubectl get pv    List Pods kubectl get pods    Verify if new FileStore Instance is Created Go to    FileStore    Instances         Step 14  Volume Restore  Connect to myapp2 Kubernetes pods and Verify    t   List Pods kubectl get pods     myapp1 POD1   Connect to Kubernetes Pod kubectl exec   stdin   tty  POD NAME      bin sh kubectl exec   stdin   tty myapp2 deployment 6dccd6557 9x6dn     bin sh cd  usr share nginx html filestore ls tail  f myapp1 txt exit    myapp1 POD2   Connect to Kubernetes Pod kubectl exec   stdin   tty  POD NAME      bin sh kubectl exec   stdin   tty myapp2 deployment 6dccd6557 mbbjm      bin sh cd  usr share nginx html filestore ls tail  f myapp1 txt exit         Step 15  Volume Restore  Access Applications    t   List Services kubectl get svc    myapp1   Access Application http    MYAPP1 EXTERNAL IP OF GET SERVICE OUTPUT  filestore myapp1 txt http   35 232 145 61 filestore myapp1 txt     myapp2   Access Application http    MYAPP2 EXTERNAL IP OF GET SERVICE OUTPUT  filestore myapp1 txt http   34 71 145 41 filestore myapp1 txt   OBSERVATION   1  For MyApp1  writer app is writing to FileStore so we get latest timestamp lines  many lines and file growing  2  For MyApp2  we have restored it from backup  which means the number of lines present in file at the time of snapshot will be only displayed   3  KEY here is we are able to successfully use the filestore backup for our Kubernetes Workloads         Step 16  Clean Up    t   Delete Kubernetes Objects kubectl delete  f 01 myapp1 kube manifests  f 02 volume backup kube manifests  f 03 volume restore myapp2 kube manifests    Verify if two FileStore Instances are deleted Go to    FileStore    Instances    Verify if FileStore Backup is deleted Go to    FileStore    Backups


gcp gke docs Implement GCP Google Kubernetes Engine GKE Artifact Registry title GCP Google Kubernetes Engine GKE Artifact Registry Step 00 Pre requisites 2 Verify if kubeconfig for kubectl is configured in your local terminal Configure kubeconfig for kubectl 1 Verify if GKE Cluster is created t

Answer:
---
title: GCP Google Kubernetes Engine GKE Artifact Registry
description: Implement GCP Google Kubernetes Engine GKE Artifact Registry
---

## Step-00: Pre-requisites
1. Verify if GKE Cluster is created
2. Verify if kubeconfig for kubectl is configured in your local terminal.
```t
# Configure kubeconfig for kubectl
gcloud container clusters get-credentials <CLUSTER-NAME> --region <REGION> --project <PROJECT>

# Replace Values CLUSTER-NAME, REGION, PROJECT
gcloud container clusters get-credentials standard-cluster-private-1 --region us-central1 --project kdaida123

# List Kubernetes Nodes
kubectl get nodes
```

## Step-01: Introduction
- Build a Docker Image
- Create a Docker repository in Google Artifact Registry.
- Set up authentication.
- Push an image to the repository.
- Pull the image from the repository and Create Deployment in GKE Cluster
- Access Sample Application in browser and verify

## Step-02: Create Dockefile
- **Dockerfile**
```t
FROM nginx
COPY index.html /usr/share/nginx/html
```

## Step-03: Build Docker Image
```t
# Change Directory
cd google-kubernetes-engine/56-GKE-Artifact-Registry/
cd 01-Docker-Image

# Build Docker Image
docker build -t myapp1:v1 .

# List Docker Image
docker images myapp1
```

## Step-04: Run Docker Image
```t
# Run Docker Image
docker run --name myapp1 -p 80:80 -d myapp1:v1

# Access in browser
http://localhost

# List Running Docker Containers
docker ps

# Stop Docker Container
docker stop myapp1

# List All Docker Containers (Stopped Containers)
docker ps -a

# Delete Stopped Container
docker rm myapp1

# List All Docker Containers (Stopped Containers)
docker ps -a
```

## Step-05: Create Google Artifact Registry
- Go to Artifact Registry -> Repositories -> Create
```t
# Create Google Artifact Registry
Name: gke-artifact-repo1
Format: Docker
Region: us-central-1
Encryption: Google-managed encryption key
Click on Create
```

## Step-06: Configure Google Artifact Repository authentication
```t
# Google Artifact Repository authentication
## To set up authentication to Docker repositories in the region us-central1
gcloud auth configure-docker <LOCATION>-docker.pkg.dev
gcloud auth configure-docker us-central1-docker.pkg.dev
```

## Step-07: Tag & push the Docker image to Google Artifact Registry
```t
# Tag the Docker Image
docker tag myapp1:v1 <LOCATION>-docker.pkg.dev/<GOOGLE-PROJECT-ID>/<GOOGLE-ARTIFACT-REGISTRY-NAME>/<IMAGE-NAME>:<IMAGE-TAG>

# Replace Values for docker tag command
# - LOCATION,
# - GOOGLE-PROJECT-ID,
# - GOOGLE-ARTIFACT-REGISTRY-NAME,
# - IMAGE-NAME,
# - IMAGE-TAG
docker tag myapp1:v1 us-central1-docker.pkg.dev/kdaida123/gke-artifact-repo1/myapp1:v1

# Push the Docker Image to Google Artifact Registry
docker push us-central1-docker.pkg.dev/kdaida123/gke-artifact-repo1/myapp1:v1
```

## Step-08: Verify the Docker Image on Google Artifact Registry
- Go to Google Artifact Registry -> Repositories -> gke-artifact-repo1
- Review **myapp1** Docker Image

## Step-09: Update Docker Image and Review kube-manifests
- **Project-Folder:** 02-kube-manifests
```yaml
# Dcoker Image
image: us-central1-docker.pkg.dev/<GCP-PROJECT-ID>/<ARTIFACT-REPO>/myapp1:v1

# Update Docker Image in 01-kubernetes-deployment.yaml
image: us-central1-docker.pkg.dev/kdaida123/gke-artifact-repo1/myapp1:v1
```

## Step-10: Deploy kube-manifests
```t
# Deploy kube-manifests
kubectl apply -f 02-kube-manifests

# List Deployments
kubectl get deploy

# List Pods
kubectl get pods

# Describe Pod
kubectl describe pod <POD-NAME>

## Observation - Verify Events command "kubectl describe pod <POD-NAME>"
### We should see image pulled from "us-central1-docker.pkg.dev/kdaida123/gke-artifact-repo1/myapp1:v1"
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  86s   default-scheduler  Successfully assigned default/myapp1-deployment-5f8d5c6f48-pb686 to gke-standard-cluster-1-default-pool-2c852f67-46hv
  Normal  Pulling    85s   kubelet            Pulling image "us-central1-docker.pkg.dev/kdaida123/gke-artifact-repo1/myapp1:v1"
  Normal  Pulled     81s   kubelet            Successfully pulled image "us-central1-docker.pkg.dev/kdaida123/gke-artifact-repo1/myapp1:v1" in 4.285567138s
  Normal  Created    81s   kubelet            Created container myapp1-container
  Normal  Started    80s   kubelet            Started container myapp1-container
Kalyans-MacBook-Pro:41-GKE-Artiact-Registry kdaida$

# List Services
kubectl get svc

# Access Application
http://<SVC-EXTERNAL-IP>
```

## Step-11: Clean-Up
```t
# Undeploy sample App
kubectl delete -f 02-kube-manifests
```

## References
- [Google Artifact Registry](https://cloud.google.com/artifact-registry/docs/overview

title  GCP Google Kubernetes Engine GKE Artifact Registry description  Implement GCP Google Kubernetes Engine GKE Artifact Registry         Step 00  Pre requisites 1  Verify if GKE Cluster is created 2  Verify if kubeconfig for kubectl is configured in your local terminal     t   Configure kubeconfig for kubectl gcloud container clusters get credentials  CLUSTER NAME    region  REGION    project  PROJECT     Replace Values CLUSTER NAME  REGION  PROJECT gcloud container clusters get credentials standard cluster private 1   region us central1   project kdaida123    List Kubernetes Nodes kubectl get nodes         Step 01  Introduction   Build a Docker Image   Create a Docker repository in Google Artifact Registry    Set up authentication    Push an image to the repository    Pull the image from the repository and Create Deployment in GKE Cluster   Access Sample Application in browser and verify      Step 02  Create Dockefile     Dockerfile      t FROM nginx COPY index html  usr share nginx html         Step 03  Build Docker Image    t   Change Directory cd google kubernetes engine 56 GKE Artifact Registry  cd 01 Docker Image    Build Docker Image docker build  t myapp1 v1      List Docker Image docker images myapp1         Step 04  Run Docker Image    t   Run Docker Image docker run   name myapp1  p 80 80  d myapp1 v1    Access in browser http   localhost    List Running Docker Containers docker ps    Stop Docker Container docker stop myapp1    List All Docker Containers  Stopped Containers  docker ps  a    Delete Stopped Container docker rm myapp1    List All Docker Containers  Stopped Containers  docker ps  a         Step 05  Create Google Artifact Registry   Go to Artifact Registry    Repositories    Create    t   Create Google Artifact Registry  Name  gke artifact repo1 Format  Docker Region  us central 1 Encryption  Google managed encryption key Click on Create         Step 06  Configure Google Artifact Repository authentication    t   Google Artifact Repository authentication    To set up authentication to Docker repositories in the region us central1 gcloud auth configure docker  LOCATION  docker pkg dev gcloud auth configure docker us central1 docker pkg dev         Step 07  Tag   push the Docker image to Google Artifact Registry    t   Tag the Docker Image docker tag myapp1 v1  LOCATION  docker pkg dev  GOOGLE PROJECT ID   GOOGLE ARTIFACT REGISTRY NAME   IMAGE NAME   IMAGE TAG     Replace Values for docker tag command      LOCATION       GOOGLE PROJECT ID       GOOGLE ARTIFACT REGISTRY NAME       IMAGE NAME       IMAGE TAG docker tag myapp1 v1 us central1 docker pkg dev kdaida123 gke artifact repo1 myapp1 v1    Push the Docker Image to Google Artifact Registry docker push us central1 docker pkg dev kdaida123 gke artifact repo1 myapp1 v1         Step 08  Verify the Docker Image on Google Artifact Registry   Go to Google Artifact Registry    Repositories    gke artifact repo1   Review   myapp1   Docker Image     Step 09  Update Docker Image and Review kube manifests     Project Folder    02 kube manifests    yaml   Dcoker Image image  us central1 docker pkg dev  GCP PROJECT ID   ARTIFACT REPO  myapp1 v1    Update Docker Image in 01 kubernetes deployment yaml image  us central1 docker pkg dev kdaida123 gke artifact repo1 myapp1 v1         Step 10  Deploy kube manifests    t   Deploy kube manifests kubectl apply  f 02 kube manifests    List Deployments kubectl get deploy    List Pods kubectl get pods    Describe Pod kubectl describe pod  POD NAME      Observation   Verify Events command  kubectl describe pod  POD NAME       We should see image pulled from  us central1 docker pkg dev kdaida123 gke artifact repo1 myapp1 v1  Events    Type    Reason     Age   From               Message                                                         Normal  Scheduled  86s   default scheduler  Successfully assigned default myapp1 deployment 5f8d5c6f48 pb686 to gke standard cluster 1 default pool 2c852f67 46hv   Normal  Pulling    85s   kubelet            Pulling image  us central1 docker pkg dev kdaida123 gke artifact repo1 myapp1 v1    Normal  Pulled     81s   kubelet            Successfully pulled image  us central1 docker pkg dev kdaida123 gke artifact repo1 myapp1 v1  in 4 285567138s   Normal  Created    81s   kubelet            Created container myapp1 container   Normal  Started    80s   kubelet            Started container myapp1 container Kalyans MacBook Pro 41 GKE Artiact Registry kdaida       List Services kubectl get svc    Access Application http    SVC EXTERNAL IP          Step 11  Clean Up    t   Undeploy sample App kubectl delete  f 02 kube manifests          References    Google Artifact Registry  https   cloud google com artifact registry docs overview


gcp gke docs Step 00 Pre requisites 2 Verify if kubeconfig for kubectl is configured in your local terminal Implement GCP Google Kubernetes Engine GKE Ingress Cookie Affinity Configure kubeconfig for kubectl title GCP Google Kubernetes Engine GKE Ingress Cookie Affinity 1 Verify if GKE Cluster is created t

Answer:
---
title: GCP Google Kubernetes Engine GKE Ingress Cookie Affinity
description: Implement GCP Google Kubernetes Engine GKE Ingress Cookie Affinity
---

## Step-00: Pre-requisites
1. Verify if GKE Cluster is created
2. Verify if kubeconfig for kubectl is configured in your local terminal
```t
# Configure kubeconfig for kubectl
gcloud container clusters get-credentials <CLUSTER-NAME> --region <REGION> --project <PROJECT>

# Replace Values CLUSTER-NAME, REGION, PROJECT
gcloud container clusters get-credentials standard-cluster-private-1 --region us-central1 --project kdaida123

# List Kubernetes Nodes
kubectl get nodes
```
3. ExternalDNS Controller should be installed and ready to use
```t
# List Namespaces (external-dns-ns namespace should be present)
kubectl get ns

# List External DNS Pods
kubectl -n external-dns-ns get pods
```

## Step-01: Introduction
- Implement following Features for Ingress Service
- BackendConfig - GENERATED_COOKIE Affinity for Ingress Service
- We are going to create two projects
  - **Project-01:** GENERATED_COOKIE Affinity enabled
  - **Project-02:** GENERATED_COOKIE Affinity disabled

## Step-02: Create External IP Address using gcloud
```t
# Create External IP Address 1 (IF NOT CREATED - ALREADY CREATED IN PREVIOUS SECTIONS)
gcloud compute addresses create ADDRESS_NAME --global
gcloud compute addresses create gke-ingress-extip1 --global

# Create External IP Address 2
gcloud compute addresses create ADDRESS_NAME --global
gcloud compute addresses create gke-ingress-extip2 --global

# Describe External IP Address to get
gcloud compute addresses describe ADDRESS_NAME --global
gcloud compute addresses describe gke-ingress-extip2 --global

# Verify
Go to VPC Network -> IP Addresses -> External IP Address
```

## Step-03: Project-01: Review YAML Manifests
- **Project Folder:** 01-kube-manifests-with-cookie-affinity
- 01-kubernetes-deployment.yaml
- 02-kubernetes-NodePort-service.yaml
- 03-ingress.yaml
- 04-backendconfig.yaml
```yaml
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
  name: my-backendconfig
spec:
  timeoutSec: 42 # Backend service timeout: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#timeout
  connectionDraining: # Connection draining timeout: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#draining_timeout
    drainingTimeoutSec: 62
  logging: # HTTP access logging: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#http_logging
    enable: true
    sampleRate: 1.0
  sessionAffinity:
    affinityType: "GENERATED_COOKIE"
```

## Step-04: Project-02: Review YAML Manifests
- **Project Folder:** 02-kube-manifests-without-cookie-affinity
- 01-kubernetes-deployment.yaml
- 02-kubernetes-NodePort-service.yaml
- 03-ingress.yaml
- 04-backendconfig.yaml
```yaml
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
  name: my-backendconfig2
spec:
  timeoutSec: 42 # Backend service timeout: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#timeout
  connectionDraining: # Connection draining timeout: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#draining_timeout
    drainingTimeoutSec: 62
  logging: # HTTP access logging: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#http_logging
    enable: true
    sampleRate: 1.0
```
## Step-05: Deploy Kubernetes Manifests
```t
# Project-01: Deploy Kubernetes Manifests
kubectl apply -f 01-kube-manifests-with-cookie-affinity

# Project-02: Deploy Kubernetes Manifests
kubectl apply -f 02-kube-manifests-without-cookie-affinity

# Verify Deployments
kubectl get deploy

# Verify Pods
kubectl get pods

# Verify Node Port Services
kubectl get svc

# Verify Ingress Services
kubectl get ingress

# Verify Backend Config
kubectl get backendconfig

# Project-01: Verify Load Balancer Settings
Go to Network Services -> Load Balancing -> Load Balancer -> Backends -> Verify Cookie Affinity Setting
Observation:
Cookie Affinity setting should be in enabled state

# Project-02: Verify Load Balancer Settings
Go to Network Services -> Load Balancing -> Load Balancer -> Backends -> Verify Cookie Affinity Setting
Cookie Affinity setting should be in disabled state
```

## Step-06: Access Application
```t
# Project-01: Access Application using DNS or ExtIP
http://ingress-with-cookie-affinity.kalyanreddydaida.com
http://<EXT-IP-1>
Observation:
1. Request will keep going always to only one POD due to GENERATED_COOKIE Affinity we configured

# Project-02: Access Application using DNS or ExtIP
http://ingress-without-cookie-affinity.kalyanreddydaida.com
http://<EXT-IP-2>
Observation:
1. Requests will be load balanced to 4 pods created as part of "cdn-demo2" deployment.
```
## Step-07: Clean-Up
```t
# Project-01: Delete Kubernetes Resources
kubectl delete -f 01-kube-manifests-with-cookie-affinity

# Project-02: Delete Kubernetes Resources
kubectl delete -f 02-kube-manifests-without-cookie-affinity
```

## References
- [Ingress Features](https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features)

http://ingress-without-cookie-affinity.kalyanreddydaida.com
http://ingress-with-cookie-affinity.kalyanreddydaida.co

title  GCP Google Kubernetes Engine GKE Ingress Cookie Affinity description  Implement GCP Google Kubernetes Engine GKE Ingress Cookie Affinity         Step 00  Pre requisites 1  Verify if GKE Cluster is created 2  Verify if kubeconfig for kubectl is configured in your local terminal    t   Configure kubeconfig for kubectl gcloud container clusters get credentials  CLUSTER NAME    region  REGION    project  PROJECT     Replace Values CLUSTER NAME  REGION  PROJECT gcloud container clusters get credentials standard cluster private 1   region us central1   project kdaida123    List Kubernetes Nodes kubectl get nodes     3  ExternalDNS Controller should be installed and ready to use    t   List Namespaces  external dns ns namespace should be present  kubectl get ns    List External DNS Pods kubectl  n external dns ns get pods         Step 01  Introduction   Implement following Features for Ingress Service   BackendConfig   GENERATED COOKIE Affinity for Ingress Service   We are going to create two projects       Project 01    GENERATED COOKIE Affinity enabled       Project 02    GENERATED COOKIE Affinity disabled     Step 02  Create External IP Address using gcloud    t   Create External IP Address 1  IF NOT CREATED   ALREADY CREATED IN PREVIOUS SECTIONS  gcloud compute addresses create ADDRESS NAME   global gcloud compute addresses create gke ingress extip1   global    Create External IP Address 2 gcloud compute addresses create ADDRESS NAME   global gcloud compute addresses create gke ingress extip2   global    Describe External IP Address to get gcloud compute addresses describe ADDRESS NAME   global gcloud compute addresses describe gke ingress extip2   global    Verify Go to VPC Network    IP Addresses    External IP Address         Step 03  Project 01  Review YAML Manifests     Project Folder    01 kube manifests with cookie affinity    01 kubernetes deployment yaml   02 kubernetes NodePort service yaml   03 ingress yaml   04 backendconfig yaml    yaml apiVersion  cloud google com v1 kind  BackendConfig metadata    name  my backendconfig spec    timeoutSec  42   Backend service timeout  https   cloud google com kubernetes engine docs how to ingress features timeout   connectionDraining    Connection draining timeout  https   cloud google com kubernetes engine docs how to ingress features draining timeout     drainingTimeoutSec  62   logging    HTTP access logging  https   cloud google com kubernetes engine docs how to ingress features http logging     enable  true     sampleRate  1 0   sessionAffinity      affinityType   GENERATED COOKIE          Step 04  Project 02  Review YAML Manifests     Project Folder    02 kube manifests without cookie affinity   01 kubernetes deployment yaml   02 kubernetes NodePort service yaml   03 ingress yaml   04 backendconfig yaml    yaml apiVersion  cloud google com v1 kind  BackendConfig metadata    name  my backendconfig2 spec    timeoutSec  42   Backend service timeout  https   cloud google com kubernetes engine docs how to ingress features timeout   connectionDraining    Connection draining timeout  https   cloud google com kubernetes engine docs how to ingress features draining timeout     drainingTimeoutSec  62   logging    HTTP access logging  https   cloud google com kubernetes engine docs how to ingress features http logging     enable  true     sampleRate  1 0        Step 05  Deploy Kubernetes Manifests    t   Project 01  Deploy Kubernetes Manifests  kubectl apply  f 01 kube manifests with cookie affinity    Project 02  Deploy Kubernetes Manifests  kubectl apply  f 02 kube manifests without cookie affinity    Verify Deployments kubectl get deploy     Verify Pods kubectl get pods    Verify Node Port Services kubectl get svc    Verify Ingress Services kubectl get ingress    Verify Backend Config kubectl get backendconfig    Project 01  Verify Load Balancer Settings Go to Network Services    Load Balancing    Load Balancer    Backends    Verify Cookie Affinity Setting Observation  Cookie Affinity setting should be in enabled state    Project 02  Verify Load Balancer Settings Go to Network Services    Load Balancing    Load Balancer    Backends    Verify Cookie Affinity Setting Cookie Affinity setting should be in disabled state         Step 06  Access Application    t   Project 01  Access Application using DNS or ExtIP http   ingress with cookie affinity kalyanreddydaida com http    EXT IP 1  Observation  1  Request will keep going always to only one POD due to GENERATED COOKIE Affinity we configured    Project 02  Access Application using DNS or ExtIP http   ingress without cookie affinity kalyanreddydaida com http    EXT IP 2  Observation  1  Requests will be load balanced to 4 pods created as part of  cdn demo2  deployment         Step 07  Clean Up    t   Project 01  Delete Kubernetes Resources  kubectl delete  f 01 kube manifests with cookie affinity    Project 02  Delete Kubernetes Resources  kubectl delete  f 02 kube manifests without cookie affinity         References    Ingress Features  https   cloud google com kubernetes engine docs how to ingress features     http   ingress without cookie affinity kalyanreddydaida com http   ingress with cookie affinity kalyanreddydaida co


gcp gke docs Implement GCP Google Kubernetes Engine GKE Ingress and Cloud CDN Step 00 Pre requisites 2 Verify if kubeconfig for kubectl is configured in your local terminal Configure kubeconfig for kubectl title GCP Google Kubernetes Engine GKE Ingress and Cloud CDN 1 Verify if GKE Cluster is created t

Answer:
---
title: GCP Google Kubernetes Engine GKE Ingress and Cloud CDN
description: Implement GCP Google Kubernetes Engine GKE Ingress and Cloud CDN
---

## Step-00: Pre-requisites
1. Verify if GKE Cluster is created
2. Verify if kubeconfig for kubectl is configured in your local terminal
```t
# Configure kubeconfig for kubectl
gcloud container clusters get-credentials <CLUSTER-NAME> --region <REGION> --project <PROJECT>

# Replace Values CLUSTER-NAME, REGION, PROJECT
gcloud container clusters get-credentials standard-cluster-private-1 --region us-central1 --project kdaida123

# List Kubernetes Nodes
kubectl get nodes
```
3. ExternalDNS Controller should be installed and ready to use
```t
# List Namespaces (external-dns-ns namespace should be present)
kubectl get ns

# List External DNS Pods
kubectl -n external-dns-ns get pods
```

## Step-01: Introduction
- Implement following Features for Ingress Service
1. BackendConfig for Ingress Service
2. Backend Service Timeout
3. Connection Draining
4. Ingress Service HTTP Access Logging
5. Enable Cloud CDN

## Step-02: 01-kubernetes-deployment.yaml
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: cdn-demo-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: cdn-demo
  template:
    metadata:
      labels:
        app: cdn-demo
    spec:
      containers:
        - name: cdn-demo
          image: us-docker.pkg.dev/google-samples/containers/gke/hello-app-cdn:1.0
          ports:
            - containerPort: 8080
```

## Step-03: 02-kubernetes-NodePort-service.yaml
- Update Backend Config with annotation **cloud.google.com/backend-config: '{"default": "my-backendconfig"}'**
```yaml
apiVersion: v1
kind: Service
metadata:
  name: cdn-demo-nodeport-service
  annotations:
    cloud.google.com/backend-config: '{"default": "my-backendconfig"}'
spec:
  type: NodePort
  selector:
    app: cdn-demo
  ports:
    - port: 80
      targetPort: 8080
```
## Step-04: 03-ingress.yaml
```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-cdn-demo
  annotations:
    # External Load Balancer
    kubernetes.io/ingress.class: "gce"
    # Static IP for Ingress Service
    kubernetes.io/ingress.global-static-ip-name: "gke-ingress-extip1"
    # External DNS - For creating a Record Set in Google Cloud Cloud DNS
    external-dns.alpha.kubernetes.io/hostname: ingress-cdn-demo.kalyanreddydaida.com
spec:
  defaultBackend:
    service:
      name: cdn-demo-nodeport-service
      port:
        number: 80
```

## Step-05: 04-backendconfig.yaml
```yaml
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
  name: my-backendconfig
spec:
  timeoutSec: 42 # Backend service timeout: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#timeout
  connectionDraining: # Connection draining timeout: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#draining_timeout
    drainingTimeoutSec: 62
  logging: # HTTP access logging: https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#http_logging
    enable: true
    sampleRate: 1.0
  cdn:
    enabled: true
    cachePolicy:
      includeHost: true
      includeProtocol: true
      includeQueryString: false
```

## Step-06: Deploy Kubernetes Manifests
```t
# Deploy Kubernetes Manifests
kubectl apply -f kube-manifests

# List Deployments
kubectl get deploy

# List Pods
kubectl get pods

# List Services
kubectl get svc

# List Ingress Service
kubectl get ingress

# List Backend Config
kubectl get backendconfig
kubectl describe backendconfig my-backendconfig
```
## Step-07: Verify Settings in Load Balancer
- Go to Network Services -> Load Balancing -> Click on Load Balancer
- Go to Backend -> Backend Services
- Verify the Settings
  - **Timeout:** 42 seconds
  - **Connection draining timeout:** 62 seconds
  - **Cloud CDN:** Enabled
  - **Logging: Enabled:** (sample rate: 1)

## Step-08: Verify Cloud CDN
- Go to Network Services -> Cloud CDN -> (Automatically created when Ingress Deployed k8s1-c6634a10-default-cdn-demo-nodeport-service-80-553facae)
- Verify Settings
  - DETAILS TAB
  - MONITORING TAB
  - CACHING TAB

## Step-09: Access Application and Verify Cache Age
```t
# Access Application
http://<DNS-NAME-FROM-INGRESS-SERVICE>
[or]
http://<IP-ADDRESS-FROM-INGRESS-SERVICE-OUTPUT>

# Access Application using DNS Name
http://ingress-cdn-demo.kalyanreddydaida.com
curl -v http://ingress-cdn-demo.kalyanreddydaida.com/?cache=true
curl -v http://ingress-cdn-demo.kalyanreddydaida.com
curl -v http://ingress-cdn-demo.kalyanreddydaida.com

## Important Note:
1. The output shows the response headers and body.
2. In the response headers, you can see that the content was cached. The Age header tells you how many seconds the content has been cached

## Sample Output
Kalyans-Mac-mini:46-GKE-Ingress-Cloud-CDN kalyanreddy$ curl -v http://ingress-cdn-demo.kalyanreddydaida.com
*   Trying 34.120.32.120:80...
* Connected to ingress-cdn-demo.kalyanreddydaida.com (34.120.32.120) port 80 (#0)
> GET / HTTP/1.1
> Host: ingress-cdn-demo.kalyanreddydaida.com
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Length: 76
< Via: 1.1 google
< Date: Thu, 23 Jun 2022 04:47:42 GMT
< Content-Type: text/plain; charset=utf-8
< Age: 1625
< Cache-Control: max-age=3600,public
<
Hello, world!
Version: 1.0.0
Hostname: cdn-demo-deployment-6f4c8f655d-htpsn
* Connection #0 to host ingress-cdn-demo.kalyanreddydaida.com left intact
Kalyans-Mac-mini:46-GKE-Ingress-Cloud-CDN kalyanreddy$
```

## Step-10: Verify Cloud CDN Monitoring Tab
- Go to Network Services -> Cloud CDN -> MONITORING Tab
- Review Charts
  - CDN Bandwidth
  - CDN Hit Rate
  - CDN Fill Rate
  - CDN Egress Rate
  - Requests
  - Response Codes

## Step-11: Verify Ingress Service Logs in Cloud Logging
- Go to Cloud Logging -> Logs Explorer -> Log Fields -> Select
- Resource Type: Cloud HTTP Load Balancer
- Severity: Info
- Project ID: kdaida123
- Review the logs
- Access Application and parallely review the logs
```t
# Access Application
curl -v http://ingress-cdn-demo.kalyanreddydaida.com
```

## Step-12: Verify Ingress Service Logs in Cloud Logging using Other Approach
- Go to Cloud Logging -> Logs Dashboard
- Go to Chart -> HTTP/S Load Balancer Logs By Severity -> Click on **VIEW LOGS**

## References
- [Ingress Features](https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features)
- [Caching overview](https://cloud.google.com/cdn/docs/caching#cacheability)

title  GCP Google Kubernetes Engine GKE Ingress and Cloud CDN description  Implement GCP Google Kubernetes Engine GKE Ingress and Cloud CDN         Step 00  Pre requisites 1  Verify if GKE Cluster is created 2  Verify if kubeconfig for kubectl is configured in your local terminal    t   Configure kubeconfig for kubectl gcloud container clusters get credentials  CLUSTER NAME    region  REGION    project  PROJECT     Replace Values CLUSTER NAME  REGION  PROJECT gcloud container clusters get credentials standard cluster private 1   region us central1   project kdaida123    List Kubernetes Nodes kubectl get nodes     3  ExternalDNS Controller should be installed and ready to use    t   List Namespaces  external dns ns namespace should be present  kubectl get ns    List External DNS Pods kubectl  n external dns ns get pods         Step 01  Introduction   Implement following Features for Ingress Service 1  BackendConfig for Ingress Service 2  Backend Service Timeout 3  Connection Draining 4  Ingress Service HTTP Access Logging 5  Enable Cloud CDN     Step 02  01 kubernetes deployment yaml    yaml apiVersion  apps v1 kind  Deployment metadata    name  cdn demo deployment spec    replicas  2   selector      matchLabels        app  cdn demo   template      metadata        labels          app  cdn demo     spec        containers            name  cdn demo           image  us docker pkg dev google samples containers gke hello app cdn 1 0           ports                containerPort  8080         Step 03  02 kubernetes NodePort service yaml   Update Backend Config with annotation   cloud google com backend config     default    my backendconfig         yaml apiVersion  v1 kind  Service metadata    name  cdn demo nodeport service   annotations      cloud google com backend config     default    my backendconfig         spec    type  NodePort   selector      app  cdn demo   ports        port  80       targetPort  8080        Step 04  03 ingress yaml    yaml apiVersion  networking k8s io v1 kind  Ingress metadata    name  ingress cdn demo   annotations        External Load Balancer     kubernetes io ingress class   gce          Static IP for Ingress Service     kubernetes io ingress global static ip name   gke ingress extip1           External DNS   For creating a Record Set in Google Cloud Cloud DNS     external dns alpha kubernetes io hostname  ingress cdn demo kalyanreddydaida com spec              defaultBackend      service        name  cdn demo nodeport service       port          number  80              Step 05  04 backendconfig yaml    yaml apiVersion  cloud google com v1 kind  BackendConfig metadata    name  my backendconfig spec    timeoutSec  42   Backend service timeout  https   cloud google com kubernetes engine docs how to ingress features timeout   connectionDraining    Connection draining timeout  https   cloud google com kubernetes engine docs how to ingress features draining timeout     drainingTimeoutSec  62   logging    HTTP access logging  https   cloud google com kubernetes engine docs how to ingress features http logging     enable  true     sampleRate  1 0   cdn      enabled  true     cachePolicy        includeHost  true       includeProtocol  true       includeQueryString  false           Step 06  Deploy Kubernetes Manifests    t   Deploy Kubernetes Manifests kubectl apply  f kube manifests    List Deployments kubectl get deploy    List Pods kubectl get pods    List Services kubectl get svc    List Ingress Service kubectl get ingress    List Backend Config kubectl get backendconfig kubectl describe backendconfig my backendconfig        Step 07  Verify Settings in Load Balancer   Go to Network Services    Load Balancing    Click on Load Balancer   Go to Backend    Backend Services   Verify the Settings       Timeout    42 seconds       Connection draining timeout    62 seconds       Cloud CDN    Enabled       Logging  Enabled     sample rate  1      Step 08  Verify Cloud CDN    Go to Network Services    Cloud CDN     Automatically created when Ingress Deployed k8s1 c6634a10 default cdn demo nodeport service 80 553facae    Verify Settings     DETAILS TAB     MONITORING TAB     CACHING TAB     Step 09  Access Application and Verify Cache Age    t   Access Application http    DNS NAME FROM INGRESS SERVICE   or  http    IP ADDRESS FROM INGRESS SERVICE OUTPUT     Access Application using DNS Name http   ingress cdn demo kalyanreddydaida com curl  v http   ingress cdn demo kalyanreddydaida com  cache true curl  v http   ingress cdn demo kalyanreddydaida com curl  v http   ingress cdn demo kalyanreddydaida com     Important Note  1  The output shows the response headers and body   2  In the response headers  you can see that the content was cached  The Age header tells you how many seconds the content has been cached     Sample Output Kalyans Mac mini 46 GKE Ingress Cloud CDN kalyanreddy  curl  v http   ingress cdn demo kalyanreddydaida com     Trying 34 120 32 120 80      Connected to ingress cdn demo kalyanreddydaida com  34 120 32 120  port 80   0    GET   HTTP 1 1   Host  ingress cdn demo kalyanreddydaida com   User Agent  curl 7 79 1   Accept           Mark bundle as not supporting multiuse   HTTP 1 1 200 OK   Content Length  76   Via  1 1 google   Date  Thu  23 Jun 2022 04 47 42 GMT   Content Type  text plain  charset utf 8   Age  1625   Cache Control  max age 3600 public    Hello  world  Version  1 0 0 Hostname  cdn demo deployment 6f4c8f655d htpsn   Connection  0 to host ingress cdn demo kalyanreddydaida com left intact Kalyans Mac mini 46 GKE Ingress Cloud CDN kalyanreddy           Step 10  Verify Cloud CDN Monitoring Tab   Go to Network Services    Cloud CDN    MONITORING Tab   Review Charts     CDN Bandwidth     CDN Hit Rate     CDN Fill Rate     CDN Egress Rate     Requests     Response Codes     Step 11  Verify Ingress Service Logs in Cloud Logging   Go to Cloud Logging    Logs Explorer    Log Fields    Select   Resource Type  Cloud HTTP Load Balancer   Severity  Info   Project ID  kdaida123   Review the logs   Access Application and parallely review the logs    t   Access Application curl  v http   ingress cdn demo kalyanreddydaida com         Step 12  Verify Ingress Service Logs in Cloud Logging using Other Approach   Go to Cloud Logging    Logs Dashboard    Go to Chart    HTTP S Load Balancer Logs By Severity    Click on   VIEW LOGS        References    Ingress Features  https   cloud google com kubernetes engine docs how to ingress features     Caching overview  https   cloud google com cdn docs caching cacheability