DevOps Classroomnotes 04/Dec/2022

Kubernetes as a Service

  • In k8s cluster we have
    • master nodes/control plane
    • nodes
  • Making master nodes highly available is our responsibilty and adding authorizations, addons etc is our responsibility
  • K8s as a service is where Cloud provider manages Master nodes/cluster and HA. They also provide features for integrating k8s with other cloud services. The upgrades to the k8s cluster are easier to handle
  • For nodes they charge usual virtual machine costs.
  • Some clouds charge hourly for control plane

Azure Kubernetes Services

  • Refer Here for launching the aks cluster
  • For doing this as requirements
    • azure cli to be installed
    • azure cli to be logged in
  • From Azure CLI instructions
az group create --name myResourceGroup --location eastus

az aks create -g myResourceGroup -n myAKSCluster --enable-managed-identity --node-count 2 --enable-addons monitoring --enable-msi-auth-for-monitoring  --generate-ssh-keys

az aks install-cli
  • Refer Here for the cluster ip service
  • Lets create nginx-rs and nginx-cluster-ip

  • Since we are in Azure and Azure has load balancer. Refer Here for the spec.

Resource Limits

  • Refer Here
  • Lets create a new replicaset with jenkins application with following
    • lower limit => requests
      • Memory => 256 Mi
    • upper limit => limits
      • Memory => 512 Mi
  • Refer Here for the changes and apply the manifest


Probes in K8s

  • Refer Here
  • k8s has 3 probes
    • liveness probe:
      • If this check fails, Pod will restart the container
    • readiness probe:
      • If this fails, this Pod will not be served by k8s service.
    • startup probe
  • k8s allows us to check this by
    • sending a http(s) request
    • sending a tcp request
    • sending a grpc request
    • send a linux command

Exercises

  • Create a mysql pod and pass the necessary environment variables via k8s manifest
  • Create a postgresql pod with environmental variables an try running with minimum memory restriction (128Ki)
  • Try to write a manifest to run daemonset with alpine with sleep 1d
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

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
Exit mobile version
%%footer%%