K8s Create Ubuntu Utility Container

From UVOO Tech Wiki
Revision as of 16:45, 12 October 2021 by Busk (talk | contribs) (Created page with "You can easily create a utility container with the following commands ``` kubectl run ubuntu --image=ubuntu -- sleep 3600 ``` ``` echo test > test.txt kubectl cp test.txt ub...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

You can easily create a utility container with the following commands

kubectl run ubuntu --image=ubuntu -- sleep 3600
echo test > test.txt
kubectl cp test.txt ubuntu:/
kubectl exec -it ubuntu -- bash
cat test.txt
apt update
apt install pgloader postgresql-client

To remove

kubectl delete pod ubuntu