Container Pod Container Container Pod Container Pod Container Pod Container Pod Container Pod Container Container Pod Container Container Pod Container Container Pod Container Container Pod Container Pod Container Pod Container
kubectl get namespaces NAME STATUS AGE default Active 32d kube-system Active 32d $ kubectl apply -f k8s-namespace.yaml namespace/myapp created $ kubectl get namespaces NAME STATUS AGE default Active 32d kube-system Active 32d myapp Active 5s
myapp data: WHOAMI_NAME: "Darth Vader" $ kubectl -n myapp get configmaps No resources found in myapp namespace. $ kubectl -n myapp apply -f k8s-configmap.yaml configmap/whoami created $ kubectl -n myapp get configmaps NAME DATA AGE whoami 1 3s apiVersion: v1 kind: Secret metadata: name: whoami namespace: myapp type: Opaque data: a-key: THVrZSwgSSdtIHlvdXIgZmF0aGVyIQo= $ kubectl -n myapp get secrets No resources found in myapp namespace. $ kubectl -n myapp apply -f k8s-secret.yaml secret/whoami created $ kubectl -n myapp get secrets NAME TYPE DATA AGE whoami Opaque 1 3s