Hi,
I am very new to kubernetes.
I created a pod and running.
I think I have to deploy it.
How can I make deployment from a pod?
regards
Hi,
I am very new to kubernetes.
I created a pod and running.
I think I have to deploy it.
How can I make deployment from a pod?
regards
Just replace the parts between <<< >>> with your values.
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: <<<Application name - Optional>>>
name: <<<Application name>>>
namespace: aitest
spec:
replicas: 3
revisionHistoryLimit: <<<number of replicas>>>
selector:
matchLabels:
app: <<<number of replicas>>>
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: <<<number of replicas>>>
spec:
containers:
image: <<<full image name (including repo)>>>
imagePullPolicy: Always
name: classifier
ports:
- containerPort: 8088
protocol: TCP
resources:
limits:
cpu: 350m
memory: 1000Mi
requests:
cpu: 200m
memory: 1000Mi
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
save it into a file and once done do:
kubectl apply -f <<<filename>>>