DEV Community

Discussion on: Kubernetes Tutorial: Learn the Basics and Get Started

Collapse
 
tp6hannah profile image
Hannah

thanks Christian !

BTW,
I got some error when apply for the pod.yaml

$ kubectl apply -f pod.yaml 
error: error when retrieving current configuration of:
Resource: "/v1, Resource=pods", GroupVersionKind: "/v1, Kind=Pod"
Name: "", Namespace: "default"
Object: &{map["apiVersion":"v1" "kind":"Pod" "metadata":map["annotations":map["kubectl.kubernetes.io/last-applied-configuration":""] "labels":map["app":"helloworld"] "namespace":"default"] "spec":map["containers":[map["image":"christianhxc/helloworld:1.0" "name":"helloworld" "ports":[map["containerPort":'P']] "resources":map["limits":map["cpu":"100m"] "requests":map["cpu":"50m"]]]]]]}
from server for: "pod.yaml": resource name may not be empty

and search the solution
if someone met the same error like , hope it helps :)
github.com/kubernetes/kubectl/issu...

make sure add the metadata.name value and the problem will be solved

Collapse
 
christianmldz profile image
Christian Melendez Scalyr

thanks Hannah! I've updated the post.

Depending on the Kubernetes version, some tags are required, and others aren't.