官术网_书友最值得收藏!

Introduction

In Chapter 1, Introduction to Kubernetes and Containers, we saw that Kubernetes is a portable and highly extensible open-source container orchestration tool. It provides very powerful capabilities that can be used to manage containerized workloads at scale. In the previous chapter, you got the big picture of how the different components of Kubernetes work together to achieve the desired goals. We also demonstrated some basic usage of kubectl in Chapter 2, An Overview of Kubernetes. In this chapter, we will take a closer look at this utility and look at how we can make use of its potential.

To reiterate, kubectl is a command-line utility for interacting with Kubernetes clusters and performing various operations. There are two ways to use kubectl while managing your cluster - imperative management, which focuses on commands rather than the YAML manifests to achieve the desired state, and declarative management, which focuses on creating and updating YAML manifest files. kubectl can support both these management techniques to manage Kubernetes API objects (also called Kubernetes API primitives). In the previous chapter, we saw how the various components constantly try to change the state of the cluster from the actual state to the desired state. This can be achieved by using kubectl commands or YAML manifests.

kubectl allows you to send commands to Kubernetes clusters. The kubectl command can be used to deploy applications, inspect, and manage Kubernetes objects, or troubleshoot and view logs. Interestingly, even though kubectl is the standard tool for controlling and communicating with a Kubernetes cluster, it doesn't come with Kubernetes. So, even if you are running kubectl on any of the nodes of your cluster, you need to install the kubectl binary separately, which we did in Exercise 2.01, Getting Started with Minikube and Kubernetes Clusters, in the previous chapter.

This chapter will walk you through the behind-the-scenes functionality of kubectl and provide more insights into how to use kubectl commands to interact with some commonly used Kubernetes objects. We will learn how to set up some shortcuts for kubectl. We will walk you through not only creating new objects with kubectl but also making changes to a live Deployment in Kubernetes. But before that, let's take a peek behind the curtains and get an idea of exactly how kubectl communicates with Kubernetes.

主站蜘蛛池模板: 广东省| 沙雅县| 咸宁市| 大渡口区| 石城县| 英山县| 巨野县| 通化市| 昭觉县| 安庆市| 通榆县| 循化| 盐亭县| 陆川县| 天镇县| 大方县| 邢台市| 隆安县| 曲周县| 青海省| 分宜县| 民勤县| 漳州市| 隆尧县| 四平市| 化州市| 甘谷县| 富阳市| 新宁县| 渭源县| 萨嘎县| 台东市| 靖州| 台安县| 霞浦县| 连云港市| 郯城县| 修武县| 专栏| 鄯善县| 改则县|