Manifests
Updated Apr 07, 2022 ·
Overview
A Manifest defines the properties and configurations of Kubernetes resources. It uses the spec (specification) to describe resource-specific attributes.
How Manifests Work
- Use
<code>kubectl create</code>to create resources from the manifest. kubectlsends the manifest to the Kubernetes API server.- The API server performs the following actions:
- Selects a node with available resources
- Schedules the Pod on the selected node
- The node pulls the Pod's container image
- The node starts the Pod's containers
Sample Manifest
Here’s an example manifest for creating a basic NGINX Pod:
apiVersion: v1
kind: Pod
metadata:
name: pod-nginx
spec:
containers:
- name: container-nginx-1
image: nginx:latest
Key Manifest Properties:
apiVersion: The API version (usually v1).kind: The resource type being created (e.g., Pod).metadata: Information about the resource.spec: Configuration details for the resource.