You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vim myapp.yaml
apiVersion: v1
kind: Pod
metadata:
name: myapp
labels:
app: myapp
spec:
restartPolicy: Never
containers:
- name: waiter
image: localhost:5000/devel/myapp:v1
command: ["/bin/sleep","120"]
Apply it:
$ kubectl apply -f myapp.yaml
Watch pod activity:
$ kubectl get events --field-selector involvedObject.name=myapp
LAST SEEN TYPE REASON OBJECT MESSAGE
<unknown> Normal Scheduled pod/myapp Successfully assigned default/myapp to minikube
9m24s Normal Pulling pod/myapp Pulling image "localhost:5000/devel/myapp:v1"
8m50s Normal Pulled pod/myapp Successfully pulled image "localhost:5000/devel/myapp:v1"
8m50s Normal Created pod/myapp Created container waiter
8m50s Normal Started pod/myapp Started container waiter
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
myapp 1/1 Running 0 10m