Since version 1.11, you can do:
kubectl wait --for=condition=complete job/myjob
and you can also set a timeout:
kubectl wait --for=condition=complete --timeout=30s job/myjob
More Related Contents:
- How to pull environment variables with Helm charts
- How kubectl port-forward works?
- kubectl apply vs kubectl create?
- how to pass environment variable in kubectl deployment?
- Restart container within pod
- Listing all resources in a namespace
- pod has unbound PersistentVolumeClaims
- How do I access the Kubernetes api from within a pod container?
- Expose port in minikube
- chown: changing ownership of ‘/data/db’: Operation not permitted
- What’s the best way to share/mount one file into a pod?
- Restart pods when configmap updates in Kubernetes?
- How to create a kubectl config file for serviceaccount
- Invalid x509 certificate for kubernetes master
- Can a PVC be bound to a specific PV?
- Connect to local database from inside minikube cluster
- Is it possible to Autoscale Akka
- Minikube expose MySQL running on localhost as service
- Allow scheduling of pods on Kubernetes master?
- Adding insecure registry in containerd
- Namespace “stuck” as Terminating, How I removed it
- How to rolling restart pods without changing deployment yaml in kubernetes?
- How to schedule pods restart
- What is a headless service, what does it do/accomplish, and what are some legitimate use cases for it?
- Ingress configuration for k8s in different namespaces
- How to access/expose kubernetes-dashboard service outside of a cluster?
- 413 error with Kubernetes and Nginx ingress controller
- Kubernetes PVC with ReadWriteMany on AWS
- Kubernetes Persistent Volume Access Modes: ReadWriteOnce vs ReadOnlyMany vs ReadWriteMany
- Renew kubernetes pki after expired