nginx.yml
apiVersion: v1
kind: Pod
metadata:
name: nginx
namespace: web
spec:
containers:
- name: nginx
image: nginx
command: ['nginx']
args: ['-g', 'daemon off;', '-q']
ports:
- containerPort: 80
## Applying Spec Definition for Creating Pod
kubectl -n web apply -f nginx.yml
## Verifying Pod running in web namespace
kubectl get pods -n web