GCP Classroom notes 29/Sep/2024

Google Kubernetes Engine (GKE)

  • This is managed production-ready environment for deploying, managing and scaling containerized applications using k8s
  • GKE automates many aspects of k8s cluster management which includes
    • updates
    • scaling
    • monitoring

Features of GKE

  • Managed K8s Service
  • Cluster Management:
    • offers two operation modes
      • standard mode: Provides more control over configuration and operation of clusters
      • Auto pilot mode: Fully managed k8s clusters where GKE handles node management, security and scaling
  • Node Autoscaling & Cluster Autoscaling
  • Integrated Security and Identity Management
  • Multi-cluster and Hybrid Deployments
  • Logging and Monitoring
  • CI/CD Integration
  • Support for stateful and stateless application
  • Network Management adn Service Mesh

How GKE Works on admins behalf

  1. Cluster Creation: GKE Cluster is composed of master node (control plane) and work nodes
  2. Deployment of Applciations
  3. Scaling and LoadBalancing
  4. Networking and Security
  5. Monitoring and Logging

GKE Operation modes

GKE Standard Mode

  • In this mode whe have full control over configuration and management of k8s clusters,
  • Features:
    • Full Control over nodes
    • Flexible Resource Management
    • Custom Networking Options
    • Manual upgrade and Maintenance
    • Custom Monitoring and Logging
    • Advance Security Configurations
    • Multi Cluster Management

GKE Autopilot Mode

  • In this mode, we get a fully managed version of GKE that abstracts most of the infrastructure management tasks
  • Key Features:
    • Hands-off Infrastructure management
    • Automatic scaling and Resoure Allocation
    • Built in Security Best Practices
    • Simplified Operational Overhead
    • Optimized Cost Management
    • Default configurations for Best Performance
    • Streamline Deployment Experience
    • Built-in Monitoring and Observability

Comparision

Feature Standard Mode Autopilot Mode
Conrol over nodes Full control over node pools and vms No direct Control, managed AUtomatically
Scaling Manual and Auto scaling Fully automated scaling and Optimization
Security Configurable Security policies Enforced security policies by default
Maintenance Manual upgrades and maintenance Automatic upgrades and maintenance
Cost Management Pay for nodes + Cluster management Pay only for resources used by workloads
Ease of Use Requires k8s expertise Minimal k8s management is required
Operational Overhead Higher, due to manual configurations Lower with automated montiroing & management
Customizations Highly customizable (os and network configurations) Limited to predefined or Optimized settings

Deploying Standard GKE Cluster and Autopilot GKE Cluster using console

  • View classroom recording for guided creation
  • and deploy a sample app
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp
  labels:
    app: myapp
spec:
  replicas: 2
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: myapp
        image: nginx
        ports:
        - containerPort: 80
        resources:
          limits:
            memory: "256Mi"
            cpu: "1000m"
          requests:
            memory: "64Mi"
            cpu: "100m"


---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: myapp-hpa
  labels:
    app: myapp
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: myapp
  minReplicas: 2
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target: 
        type: Utilization
        averageUtilization: 70

---
apiVersion: v1
kind: Service
metadata:
  name: myapp
spec:
  type: LoadBalancer
  selector:
    app: myapp
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube