Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Kubernetes Manifest?

Tags:

kubernetes

I've searched online and most links seem to mention manifests without actually explaining what they are. What are Manifests?

like image 815
LM10 Avatar asked Mar 12 '19 21:03

LM10


People also ask

What is deployment manifest?

A deployment manifest is an XML file that describes a ClickOnce deployment, including the identification of the current ClickOnce application version to deploy. Deployment manifests have the following elements and attributes. Element.

What is a manifest in Devops?

Answer. Manifest: Syntactic text, usually a file with a variety of details, that is used for the purpose of convergence towards a desired state.

How do I see the manifest file in Kubernetes?

Your answer You can use --dry-run flag to test the manifest. This is really useful not only to ensure if the yaml syntax is right for a particular Kubernetes object but also to ensure that a spec has required key-value pairs.


2 Answers

It's basically a Kubernetes "API object description". A config file can include one or more of these. (i.e. Deployment, ConfigMap, Secret, DaemonSet, etc)

As per this:

Specification of a Kubernetes API object in JSON or YAML format.

A manifest specifies the desired state of an object that Kubernetes will maintain when you apply the manifest. Each configuration file can contain multiple manifests.

And a previous version of the documentation:

Configuration files - Written in YAML or JSON, these files describe the desired state of your application in terms of Kubernetes API objects. A file can include one or more API object descriptions (manifests).

like image 147
Rico Avatar answered Oct 09 '22 08:10

Rico


When you are going to deploy to kubernetes , or create a kubernetes resources like a pod , replica-set , configmap , secret , deployment , etc , you need to write a file called manifest that describe that object and its attributes either in yaml or json.

Just like you do in:

  • puppet manifest

  • ansible playbook

  • chef recipe

etc

Ofcourse you can create those objects by using just command line , but the recommended way is to write a file so that you can version control it and use it in a repeatable way.

like image 24
Ijaz Ahmad Avatar answered Oct 09 '22 09:10

Ijaz Ahmad