Use a declarative API to allow users to easily describe the desired state of the cluster instead of directly manipulating the underlying entities;

Author: Zen and the Art of Computer Programming

1 Introduction

The declarative API is an API that describes the desired state of the cluster. It allows users to describe the desired state of the cluster in an easier-to-understand way with less code, instead of directly manipulating the underlying Kubernetes objects (such as Pod, Service, and Deployment). This API can be used to configure automation tools and processes, and can be applied to any Kubernetes. The goal of the declarative API is to improve the user experience by providing a language model that is simple, highly readable, and easily extensible.

The point of a declarative API is to provide users with a common way to describe the desired state of the cluster and allow them to use different DSLs or programming models to achieve that goal. Different from the command line or web UI, the declarative API can highly abstract and encapsulate the complexity of the underlying system, enabling users to pay more attention to the needs of the business field rather than the operation and maintenance of the Kubernetes cluster itself.

A declarative API offers the following advantages:

  1. Higher availability and ease of use: Users can manage cluster resources in a declarative manner, no longer need to understand various syntax and fields related to underlying Kubernetes objects, but only need to master some basic YAML syntax.
  2. A more concise and consistent API: APIs with the same functionality can be invoked through declarative syntax instead of relying on complex instruction sets like the kubectl command line.
  3. Extensibility: The declarative API can be flexibly mapped to the underlying Kubernetes objects to achieve the best user experience.

This article will take Istio as an example to introduce how to use declarative API to define and manage service mesh.

2. Explanation of basic concepts and terms

Istio is a service mesh framework for managing microservices jointly open sourced by Google, IBM, Lyft, and Tetrate. Its main components include Envoy, Mixer, Pilot, Citade

Guess you like

Origin blog.csdn.net/universsky2015/article/details/132255944