---
# System prepended metadata

title: '[k8s] Namespace'
tags: [kubernetes]

---

[k8s] Namespace
===============
###### tags: `kubernetes`

```shell=
kubectl create namespace dev
```
```shell=
kubectl apply -f pod-definition.yaml --namespace=dev
```
```yaml=
# pod-definition.yaml
apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod
  namespace: dev
  labels:
    app: myapp
    type: front-end
spec:
  containers:
    - name: nginx-container
      image: nginx
```