Im new in k8s and recently I found out about the PodTemplate. I understand its used as its name implies, to be a template to deploy pods. However I have been trying to deloy pods using a simple PodTemplate:
apiVersion: v1
kind: PodTemplate
metadata:
name: webapp-template
#namespace: app
labels:
app: webapp
name: nginx-webapp
template:
metadata:
name: nginx-pod
labels:
name: nginx-pod
app: demo-app
spec:
containers:
- name: nginx-pod
image: nginx
How can I deploy pods using kubectl using a PodTemplate? Or is this object simply meant to be availalble for reading?