https://kubernetes.io/docs/user-guide/walkthrough/
The simplest pod definition describes the deployment of a single container. For example, an nginx web server pod might be defined as such:
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
Ensure that health checks are performed against your instance
apiVersion: v1
kind: Pod
metadata:
name: nginx
#namespace: default
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
env:
- name: "SOMEVARIABLE"
value: "somevalue"
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 15
timeoutSeconds: 1
To reference an image from your own registry you need to reference a credential for the cluster to login. Check the hint about secrets: here 📘
apiVersion: "v1"
kind: Pod
metadata:
name: somePodName
labels:
name: someLabelName
spec:
containers:
- name: blue
image: someRegistryOnAzure.azurecr.io/someImage:latest
ports:
- containerPort: 80
name: http
protocol: TCP
imagePullSecrets:
- name: nameOfYourSecret