podman-desktop/website/docs/kubernetes/applying-a-yaml-manifest.md
Anders Björklund effc6f84e8
fix: update the markdownlint targets (#10487)
* docs: fix lint markdown style issues

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2024-12-30 11:37:17 +01:00

2 KiB

sidebar_position title description keywords tags
12 Applying a YAML manifest How to apply a YAML manifest to create a kubernetes object
podman desktop
podman
objects
kubernetes
applying-a-yaml-manifest
creating-an-object

Applying a YAML manifest

You can deploy a YAML manifest to create a Kubernetes object, such as Node, Deployment, Service, PersistentVolumeClaim, and others. For example, a Kubernetes deployment that requires sensitive data storage, you can apply a YAML manifest to create a Secret object.

Prerequisites

Make sure you have:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
spec:
  selector:
    matchLabels:
      run: my-nginx
  replicas: 3
  template:
    metadata:
      labels:
        run: my-nginx
    spec:
      containers:
        - name: my-nginx
          image: nginx
          ports:
            - containerPort: 80

This YAML manifest creates three pods that run the NGINX web server.

Procedure: Applying a YAML manifest to create a Deployment object

  1. Go to the Kubernetes component page.
  2. Click Deployments in the left navigation pane.
  3. Click Apply YAML and select the YAML manifest file. A confirmation notification opens. applying a yaml manifest
  4. Click OK. confirmation notification

Verification

  1. View the newly created my-nginx deployment on the same page. nginx deployment

  2. Go to the Pods component page to view three instances of the NGINX web server running. nginx pods running

    :::note

    When you apply any other YAML manifest, you can view the newly created object on the corresponding component page.

    :::