I wrote a k8s script but am been failed

Below is my screen shot
Screenshot from 2024-09-15 20-58-14

Issues:

  1. That doesn’t look like a script. Could you please include the script.
  2. Where is this from? If it’s KK Engineer, we need a review link please. If it’s from a lab, a lab link.

I corrected my error and created the K8s pod with kubectl create -f but this still gave me errors. Initially i created the file locally using touch . I have been practicing k8s using minikube but the master node is much different and i will be glad to get a bit of help on how to create the file.

Assuming that the screenshot is the YAML file you were working with – we don’t call those “scripts”, we call those “YAML” or “YAML files” – then that looks like a slightly illegal YAML file.

Rather than post an image of the file, it is much better to post a code block, so I can edit it w/o having to type the whole thing from scratch. The edit pane here has a </> button that will create an empty block for you; use that, and paste your YAML into that block.

Hello Rob,
I was able to resolve the problem. Thank you.

apiVersion: v1
kind: Pod
metadata:
  name: pod-nginx
  labels:
    app: nginx_app
spec:
  containers:
  - name: nginx-container
    image: nginx:latest