Reputation: 61
As per an article I read, while using the 'kubectl run' command,
However, when I try that on my Minikube installation it is creating a resource of kind: Pod
k run ngingx --image=nginx -o yaml --dry-run=client --restart Always
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: ngingx
name: ngingx
spec:
containers:
- image: nginx
name: ngingx
resources: {}
dnsPolicy: ClusterFirst
restartPolicy: Always
status: {}
Has the feature been deprecated or am I doing something wrong ?
Thank You
Upvotes: 2
Views: 2441
Reputation: 9174
it should be like this
kubectl create deployment ngingx --image=nginx -o yaml --dry-run=client
Nope the restart: Always
does not create pod or deplyoment it's about the container restart policy which is used for restarting container if pod crashes it tries restart.
Upvotes: 1