YAML Deployments

Kubernetes Cluster: YAML Deployments

Kubernetes natively supports application and resource deployment from both YAML and JSON definitions. YAML is widely used in the Kubernetes ecosystem because a single .yaml or .yml file can describe one object or a complete list of related Kubernetes objects.
Kubernetes Dashboard Paste YAML or JSON directly into the Dashboard and create the defined resources without installing extra deployment software.
kubectl Apply a local manifest file directly from the command line with kubectl apply -f.

YAML Deployment Overview

A Kubernetes YAML file contains the declarative definition of one or more Kubernetes resources. The same type of definition can also be written in JSON, but YAML is the more common format in the Kubernetes community.

  • A manifest can define a single Kubernetes object or multiple objects.
  • The file can be applied directly without installing Helm or another package manager.
  • The same manifest can be reused to reproduce an application configuration in another compatible Kubernetes environment.
YAML deployment is a direct Kubernetes-native method. The manifest itself contains the resource definitions that Kubernetes should create or update.

Deploy through Kubernetes Dashboard

Kubernetes Dashboard allows YAML or JSON content to be entered directly and applied to the currently selected namespace.

1Open the target namespace

Sign in to Kubernetes Dashboard and select the namespace where the resources should be created.

2Create from input

Open the resource-creation interface and choose the option to create resources from direct input.

3Paste YAML or JSON

Paste the complete resource definition into the editor and submit it to Kubernetes.

Deploy Kubernetes application from YAML in Dashboard
Kubernetes Dashboard can create resources directly from pasted YAML or JSON definitions.

Deploy with kubectl

When working from the command line, apply the deployment manifest by passing the correct file path to kubectl apply:

kubectl apply -f /path/to/deployment.yaml

Kubernetes reads the resource definitions in the file and creates or updates the corresponding objects in the cluster.

Before applying: Make sure the active kubectl context points to the intended cluster and that the YAML uses the correct namespace, API versions, resource names, and configuration values.

YAML vs Helm

Direct YAML deployment and Helm charts are related approaches, but Helm adds a templating and package-management layer on top of Kubernetes manifests.

Direct YAML Best suited to straightforward Kubernetes resource definitions that can be applied as written.
Helm Charts Provide additional flexibility through conditions, replacements, parameters, reusable values, packaged releases, upgrades, and rollback history.
Use direct YAML when the resource definitions are simple and explicit. Use Helm when the deployment requires reusable parameters, conditional logic, release management, or repeatable packaging across environments.
YAML deployment summary: Define the required Kubernetes resources in a YAML or JSON manifest, then apply the definition directly through Kubernetes Dashboard or with kubectl apply -f. No additional deployment tool is required.

What’s next?