Skip to main content

Kubernetes | K8s | Kubernetes Components

Kubernetes:
  • Kubernetes word derived from Greek word meaning Helmsman – person who steers a ship.
  • Open-sourced handed over to the Cloud Native Computing Foundation (CNCF), written in Go (Golang)
  • Kubernetes is an orchestration, orchestration of containerized apps., often written as k8s
  • It is leading container orchestrator lets us manage containerized apps and or micro service apps.
  • Micro service apps made of lots of small and independents parts.
  • You say hey Kubernetes, here is my app, consist of these parts, just run it for me, and Kubernetes run it.  
  • You package the app as containers, give them declarative manifest, and let Kubernetes runt it.
  • It is platform agnostic, runs on bare metal, VMs, cloud instances (private and public), OpenStack, anything with Linux.
  • Does scaling, self-healing, load balancing, rolling updates and more.
  • Lives on Github at kubernetes/kubernetes, Twitter - @kubernetesio
How Kubernetes relate to Docker:
  • Docker is a low level technology, orchestrated and managed by Kubernetes.
  • Kubernetes has also released Container Runtime Interface – (CRI) 

Explore Kubernetes Master and workers

Kubernetes and Borg:
  • Google use frameworks – Borg and Omega (Google in house technology), to check billions of container in check. That is why some people think Kubernetes is an open-sourced version of either Borg or Omega, but it is not.
Kubernetes components:
  • Kubernetes made of one more masters (also refereed as control plane) and bunch of nodes. Explore at - https://shrenikp.blogspot.com/2020/03/kubernetes-masters-control-plane.html
  • Application service runs on nodes.
  • Deployment means package application and deploy it on Kubernetes.
  • Deployments defined via YAML or JSON manifest file – contains what images to use, ports to expose, network to join, how to perform update, how many replicas etc. we give file to Kubernetes master, which deploy it on cluster, constantly monitor it, and make sure it is running exactly as requested. If something is not as we ask, it tries to fix it. Deployments build on top of Replicaset, add update model, make versioned rollback.It is first-class REST objects in Kubernetes API.
  • Pods - Minimum unit of scaling in Kubernetes, mortal, born, live and die. In VM World atomic unit of deployment is virtual machine, in Docker world, its container, in Kubernetes it's POD. Containers always runs inside Pods. If POD die, Kubernetes start another one, smell, feel exactly like one that died, with new ID and new IP address, in cluster
    You can run multiple container inside single POD, they share the same environment such as IPC namespace, shared memory, volumes, network stack etc., same IP address. Multiple container in the same POD can communicate using localhost, good for tightly coupled container requirement. To scale application you do add POD and not container. 
    PODS are deployed via ReplicaSets. ReplicaSets is a higher-lever Kubernetes object that wraps around a Pod and adds features, such as self healing, and scaling.
  • Services - Services are fully-fledged objects like, PODS, Replicaset, and Deployments. Services provide stable IP addresses, DNS, support TCP (default) and UDP, load balancing across PODS, stable networking endpoint. Sends traffic to healthy Pods. 
  • Labels - Services knows which Pods to load-balance across is via labels. Pods are loosely associated with Service, as they share same lables as the Service.
  • ConfigMap:
    1. An API object stores non-confidential data in key-value pairs.
    2. Pods can use ConfigMaps as environment variables, command-line arguments, or as configuration files in a volume.
    3. It allows you to decouple environment-specific configuration from container images, so applications are easily portable.
    4. It is not designed to hold large chunks of data.
    5. Limit to store data for ConfigMap is 1 MiB. Mounting a volume or use separate database or file service to store more data.
    Explore

Comments

Popular posts from this blog

MySQL InnoDB cluster troubleshooting | commands

Cluster Validation: select * from performance_schema.replication_group_members; All members should be online. select instance_name, mysql_server_uuid, addresses from  mysql_innodb_cluster_metadata.instances; All instances should return same value for mysql_server_uuid SELECT @@GTID_EXECUTED; All nodes should return same value Frequently use commands: mysql> SET SQL_LOG_BIN = 0;  mysql> stop group_replication; mysql> set global super_read_only=0; mysql> drop database mysql_innodb_cluster_metadata; mysql> RESET MASTER; mysql> RESET SLAVE ALL; JS > var cluster = dba.getCluster() JS > var cluster = dba.getCluster("<Cluster_name>") JS > var cluster = dba.createCluster('name') JS > cluster.removeInstance('root@<IP_Address>:<Port_No>',{force: true}) JS > cluster.addInstance('root@<IP add>,:<port>') JS > cluster.addInstance('root@ <IP add>,:<port> ') JS > dba.getC...

Amazon RDS | Amzon Redshift | Big Data | Boost Performance with Amazon ElastiCache

Amazon RDS with Amazon ElastiCache for Performance: Amazon RDS supports - Oracle, MS SQL server, MySQL, Maria DB and PostgreSQL. It is a managed service offered by the Amazon.  Couple of customers have observed the performance issues during their journey with Amazon RDS with Oracle, MS SQL Server, MySQL, Maria DB and PostgreSQL. Amazon cloud engineers / database consultants / database architect and Amazon supports worked to-gather to boost the Amazon RDS performance by tuning the RDBMS configuration parameters using Amazon RDS parameter group , and have not achieved the SLA for Amazon RDS .  Amazon RDS with Multi AZ and Read Replica: Some of the the AWS professionals have suggested for vertical scaling of the Amazon RDS . It should works and its absolutely correct. In my opinion, it would be a good idea to think about the Amazon ElastiCache service with Amazon RDS for better performance and cost optimization also rather than vertically scaling the Amazon RDS . I would sug...

Needs for Graph Database

Needs for Graph Database: We are living in the era of data, data is treated more precise than gold and platinum. Most of the enterprises are trying to get more insight about the data they have it as an operational / warehouse / analytical.   Ref.: https://dist.neo4j.com/wp-content/uploads/graph-example.png To get more insight into the data, it is required to see the relationship among the data points. The challenge is how to establish the relationship among data points and the answers is Graph database. Relational databases can't help to establish the relationship among data points, due to their rigid schema, and consistent schema. Relational Database issues for data set: Number of Joins:  While fetching data from relational databases, we join many tables, these joins are complex, and consume considerable amount of computing resources, which increase the query response times. Self- joins: For database ware house / business intelligence systems using RDBMS, self-JOIN are ...