What is Kubernetes ?
What is Kubernetes ?
- Kubernetes is a portable, extensible open-source platform for managing containerized workloads and services, that enables both declarative configuration and automation.
- It has a large, fast growing ecosystem. Generally Kubernetes services, support, and tools are available.
- Kubernetes, or ‘k8s’ (pronounced “Kate’s”) as it’s generally observed, is associate degree ASCII text file package tool that was originally created by Google and is currently being maintained by the Cloud Native Computing Foundation.
- The Kubernetes cluster consists of two basic types of resources:
- Master server - A master server organizes the cluster
- Node server - Nodes are the workers that contain and run the applications
- Each node contains a Kubelet, which is the agent for managing the node and communicating with the master. We can use kubectl to deploy, explore, review and remove Kubernetes objects (like nodes, images or containers).
Learn kubernetes - kubernetes tutorial - Kubernetes Master - kubernetes examples - Tutorials programs
Why do you need Kubernetes ?
- Kubernetes features are:
- A container platform
- A microservices platform
- A portable cloud platform and more.
- Kubernetes provides a container-centric management environment. It composes computing, networking, and storage infrastructure on behalf of user workloads.
- This provides the ease of Platform as a Service (PaaS) with the flexibility of Infrastructure as a Service (IaaS), and allows portability across infrastructure providers.
What is a Pod ?
- A Pod is simply an abstraction that kubernetes uses to represent a group application container as well as some shared resources like:
- Shared storage (volumes)
- Networking, as a unique cluster IP address.
- Information about how to run each container, such as the container image version or specific ports to use.
- Containers generally scheduled together in a single pod if they are tightly coupled and need to share resources such as disk.
Learn kubernetes - kubernetes tutorial - What is Kubernetes Pod - kubernetes examples - kubernetes programs
Read Also
Golang ToolsWhat is kubectl ?
- kubectl is a command line interface for running commands against Kubernetes clusters.
- It controls the Kubernetes cluster manager.
- kubectl commands is the human readable plain-text format and it has a wide functionality.
Syntax
Installing kubectl
- On an Ubuntu 16.04 LTS server, here are the commands to use if logged in as root to install kubectl:
Learn kubernetes - kubernetes tutorial - Kubernetes Command - kubernetes examples - kubernetes programs
Learn kubernetes - kubernetes tutorial - Kubernetes Workload - kubernetes examples - kubernetes programs
Kubectl Commands for Basic Kubernetes Functions:
- There are the five basic commands we will be reviewing along with their fundamental definition they are:
kubectl create
- The create command constructs a resource from a configuration file or stdin (or standard input). A resource is defined as “something that can be “requested by”, “allocated to”, “or consumed by” a pod or container.”
kubectl get
- The get command displays a table of the most relevant information about one or multiple relevant resources.
kubectl run
- The run command will kickoff one or more instances of a container in the cluster.
kubectl expose
- The expose command will start to load balance inbound traffic across your running instances. This command can also create a High Availability proxy for the client to access the running containers from outside the cluster.
kubectl delete
- The delete command removes defined resources by
- Filenames
- Stdin
- Resources and names
- Resources and label selector
Kubectl App Management
- kubectl edit - Alters the characteristics of a resource on a server exploitation the default editor.
- kubectl apply - Applies a modification to a resource from a file or stdin.
- kubectl label - Adds or updates a selected attribute to specifically establish associate degree object.
Working with Apps Using Kubectl
- kubectl exec - Runs a command on a container in a pod.
- kubectl logs - Prints a container log.
- kubectl describe - Displays the status or state of the resources.
Kubectl Cluster Management
- kubectl cluster-info - Displays information about the master and services in the cluster.
- kubectl drain - removes pods in preparation for maintenance.
- kubectl certificate - Approves a CSR or certificate signing request
Kubectl Settings and Usage
- kubectl api - resources (eg. Pods and Services) - Lists all of the supported resources and their shortnames, API grouping, if namespaced, and Kind
- kubectl config - Changes or alters kubeconfig files
- kubectl version - Displays the Kubernetes version