DEV Community

Kubernetes Tutorial: Learn the Basics and Get Started

Christian Melendez on October 29, 2019

It's been over five years since Google open-sourced the Kubernetes project. Even so, you might still be wondering what Kubernetes is and how you ca...
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

thanks Hannah! I've updated the post.

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

Collapse
 
cauldyclark15 profile image
Joselie Castaneda

this is gold, thanks man!

Collapse
 
christianmldz profile image
Christian Melendez

thanks Joseline :)