Skip to main content

Introduction to Kubernetes

Introduction to Kubernetes

 

Kubernetes is a powerful platform for managing containerized applications. It is an open-source project that was originally developed by Google, and is now maintained by the Cloud Native Computing Foundation (CNCF).

One of the key benefits of Kubernetes is its ability to automate the deployment, scaling, and management of containerized applications. This makes it an ideal platform for running microservices, which are small, modular, and independently deployable units of software.

Kubernetes is built on top of a number of core components, including:

  • The API server, which exposes the Kubernetes API and handles communication between the different components of the system.

  • The etcd datastore, which stores the configuration data for the Kubernetes cluster.

  • The controller manager and the scheduler, which handle the orchestration of the containerized applications and the scheduling of resources, respectively.

  • The kubelet, which runs on each node in the cluster and is responsible for starting and stopping containers.

  • The kubeproxy, which provides network connectivity between the different components of the cluster.

One of the key features of Kubernetes is its ability to scale containerized applications up and down based on demand. This is achieved through the use of replicasets and deployments, which define the desired state of the application and automatically manage the scaling of the container instances.

Another important feature of Kubernetes is its support for service discovery and load balancing. Kubernetes allows you to define services, which are logical abstractions of one or more pods, and automatically load balance traffic across the instances of the service.

Kubernetes also provides a number of tools for monitoring and logging, including Prometheus, Grafana, and Elasticsearch, which allow you to collect and analyze metrics and logs from the containerized applications and the Kubernetes cluster itself.

In addition to its core functionality, Kubernetes is also highly extensible. There are a wide variety of add-ons and plugins available for Kubernetes, including ingress controllers, which provide external access to the containerized applications, and volume plugins, which allow you to mount external storage volumes into the containerized applications.

Overall, Kubernetes is a powerful and flexible platform for managing containerized applications. Its ability to automate deployment, scaling, and management, combined with its support for service discovery and load balancing, make it an ideal platform for running microservices at scale.

Comments

Popular posts from this blog

Manual Kubernetes TLS certificate renewal procedure

Intro Kubernetes utilizes TLS certificates to secure different levels of internal and external cluster communication.  This includes internal services like the apiserver, kubelet, scheduler and controller-manager etc. These TLS certificates are created during the initial cluster installation and are usually valid for 12 months. The cluster internal certificate authority (CA) certificate is valid for ten years. There are options available to automate certificate renewals, but they are not always utilised and these certs can become out of date. Updating certain certificates may require restarts of K8s components, which may not be fully automated either. If any of these certificates is outdated or expired, it will stop parts or all of your cluster from functioning correctly. Obviously this scenario should be avoided - especially in production environments. This blog entry focuses on manual renewals / re-creation of Kubernetes certificates. For example, the api-server certificate below...

Analysing and replaying MySQL database queries using tcpdump

Why There are situations where you want to quickly enable query logging on a MySQL Database or trouble shoot queries hitting the Database server in real-time. Yes, you can enable the DB query log and there are other options available, however the script below has helped me in many cases as it is non intrusive and does not require changing the DB server, state or configuration in any way. Limitations The following only works if the DB traffic is not encrypted (no SSL/TLS transport enabled). Also this needs to be run directly on the DB server host (as root / admin). Please also be aware that this should be done on servers and data you own only. Script This script has been amended to suit my individual requirements. #!/bin/sh tcpdump -i any -s 0 -l -w - dst port 3306 | strings | perl -e ' while(<>) { chomp; next if /^[^ ]+[ ]*$/;   if(/^(ALTER|COMMIT|CREATE|DELETE|DROP|INSERT|SELECT|SET|UPDATE|ROLLBACK)/i) {     if (defined $q) { print "$q\n"; }     $q=$_; ...

Deprecating Networking Ingress API version in Kubernetes 1.22

  Intro Kubernetes deprecates API versions over time. Usually this affects alpha and beta versions and only requires changing the apiVersion: line in your resource file to make it work. However with this Ingress object version change, additional changes are necessary. Basics For this post I am quickly creating a new cluster via Kind (Kubernetes in Docker) . Once done, we can see which API versions are supported by this cluster (version v1.21.1). $ kubectl api-versions | grep networking networking.k8s.io/v1 networking.k8s.io/v1beta1 Kubernetes automatically converts existing resources internally into different supported API versions. So if we create a new Ingress object with version v1beta1 on a recent cluster version, you will receive a deprecation warning - and the same Ingress object will exist both in version v1beta1 and v1. Create $ cat ingress_beta.yaml apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata:   name: clusterpirate-ingress spec:   rules:  ...