Creating a Kubernetes configuration file
Earlier in this chapter, in the Introduction to Kubernetes section, we learned about the various Kubernetes services that we will use to deploy our microfrontends.
Deploying these services on Kubernetes is commonly done by defining the various configuration settings in a .yaml
file and then applying the configuration to the Kubernetes cluster.
In this section, we will learn about the structure of these Kubernetes spec files and how to go about creating them for our deployments, services, and Ingress.
The structure of a Kubernetes spec file
A Kubernetes spec file is a YAML document that describes the desired state of a Kubernetes object, such as a Deployment, Pod, Service, or ConfigMap. The structure of a Kubernetes spec file generally consists of two main parts – the metadata section and the spec section. Each file always starts by defining the apiVersion
and the kind
of spec file.
The metadata section includes information...