Two ways of creating a pod in Kubernetes
Imperative way ( Through command or API calls):
kubectl run nginx-pod --image=nginx:latest
Declarative way ( By creating manifest files):
# This is a sample pod yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
labels:
env: demo
type: frontend
spec:
containers:
- name: nginx-container
image: nginx
ports:
- containerPort: 80