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:
- A running Podman machine.
- A running Kubernetes cluster.
- Created a YAML manifest file using the following code, if you do not have one on your machine:
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
- Go to the Kubernetes component page.
- Click Deployments in the left navigation pane.
- Click Apply YAML and select the YAML manifest file. A confirmation notification opens.
- Click OK.
Verification
-
View the newly created
my-nginx
deployment on the same page. -
Go to the Pods component page to view three instances of the NGINX web server running.
noteWhen you apply any other YAML manifest, you can view the newly created object on the corresponding component page.