May 2018
Intermediate to advanced
554 pages
13h 51m
English
For creating a Namespace, following are the steps:
$ cat my-first-namespace.yamlapiVersion: v1kind: Namespacemetadata: name: my-namespace// create the resource by subcommand "create"$ kubectl create -f my-first-namespace.yamlnamespace "my-namespace" created// list the namespaces again$ kubectl get nsNAME STATUS AGEdefault Active 16dkube-public Active 16dkube-system Active 16dmy-namespace Active 6s
// run a Deployment with a flag specifying Namespace$ kubectl run my-nginx --image=nginx --namespace=my-namespace ...
Read now
Unlock full access