If this post was helpful, please click the clap 👏 button below a few times to show your support! ⬇
Labels selectors are core grouping primitive in Kubernetes. They are used by the users to select a set of objects. Kubernetes API currently supports two types of selectors − Equality-based selectors.
You can constrain a pod to run only on particular nodes. The recommended approach to do this is to use label selectors to make the selection.
Following are the types of Kubernetes selector.
Kubernetes namespace is an abstraction to support multiple virtual clusters on the same physical cluster.
You can have multiple namespaces within one Kubernetes cluster, and they are all logically isolated from one another.
Namespaces provide a logical separation of cluster resources between multiple users, teams, projects, and even customers. Namespaces are how to divide cluster resources between multiple users (via resource quota).
Namespaces have below functionalities and on basis of the same we tend to use will use them.
Like other controllers, DaemonSets manage groups of replicated Pods.
However, DaemonSet ensures that all or selected Worker Nodes run a copy of a Pod (one-Pod-per-node).
As you add nodes, DaemonSets automatically add Pods to the new nodes. As the nodes are removed from the cluster, those Pods are garbage collected.
Here is the manifest of DaemonSet:
- name: fluentd
Create a daemonset:
kubectl create -f daemonset.yamldaemonset.apps "fluentd" created
Check the pod running:
Google Kubernetes Engine (also known as GKE) is a managed, production-ready environment for running Docker containers in the Google cloud.
It permits you to form multiple-node clusters whereas conjointly providing access to any or all Kubernetes options.
Table of Contents
This chapter shows an example of how different microservices within an application can use service discovery to locate each other in the infrastructure rather than via hardcoded IP addresses.
To perform exercises in this chapter, you’ll need to deploy configurations to a Kubernetes cluster. To create an EKS-based Kubernetes cluster, use the AWS CLI (recommended). If you wish to create a Kubernetes cluster without EKS, you can instead use kops.
All configuration files for this chapter are in the
microservices directory. …
In this article we provide step-by-step instructions for several common ways to set up a Kubernetes cluster on AWS:
Kops is a production-grade tool used to install, upgrade, and operate…
Data stored in Docker containers are ephemeral i.e. it only exists until the container is alive.
When Kubernetes restart a failed or crashed container, you will lose any data stored in the container filesystem. Kubernetes solves this problem with the help of Volumes.
Monitoring is one of the key components for managing large clusters. For this, we have several tools.
It is a monitoring and alerting system. It was built at SoundCloud and was open-sourced in 2012. It handles the multi-dimensional data very well.
Prometheus has multiple components to participate in monitoring −
A PersistentVolume (PV) is a storage resource in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.
A cluster administrator creates several PVs. They carry the details of the real storage, which is available for use by cluster users.
Before you can use an EBS volume with a Pod, you need to create it.
aws ec2 create-volume \--availability-zone=eu-west-1a \--size=100 \--volume-type=gp2PersistentVolume spec: