# How do I read and validate a Kubernetes YAML manifest before applying it to VKS?

Exam: 3V0-24.25 — Advanced VMware Cloud Foundation 9.0 vSphere Kubernetes Service
Knowledge domain: IT Architectures, Technologies, Standards
Updated: 2026-11-25T06:11:28.504178+00:00
HTML: https://learningpathx.com/faq/3V0-24.25/vcap2425-kubernetes-yaml-kubectl.html

## Also asked as

- What should I check in workload YAML before using kubectl against a VKS cluster?
- How can I check a Kubernetes manifest against VKS without creating the workloads?

Read the manifest's `apiVersion`, `kind`, `metadata`, and object fields, often under `spec`. Check whether the resource is supported by the target VKS workload cluster and which namespace it belongs to. With access and the necessary API permissions, run `kubectl apply --dry-run=server` against that cluster to have its API evaluate the request without persisting the change.

For an ordinary namespaced workload manifest, use a kubectl version compatible with the cluster. Confirm the API endpoint and identity represented by your context and check the intended namespace, including any `metadata.namespace` in the file.

```sh
kubectl config get-contexts
kubectl --context "vks-workload-context" -n "app-namespace" apply --dry-run=server -f workload.yaml
```

Replace the example context and namespace with your own. A successful dry run shows the submitted resources passed the API checks for that request. Controllers still have to reconcile real objects after application. Review manifests in version control and verify rollout and workload readiness after a separately authorized apply.

* [Objects in Kubernetes](https://kubernetes.io/docs/concepts/overview/working-with-objects/)
* [Kubernetes kubectl apply reference](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_apply/)

Source: [Kubernetes Fundamentals for VMware vSphere Administrators](https://learningpathx.com/news/kubernetes-fundamentals-for-vmware-vsphere-administrators.html)
