A Docker container that provides some useful tools to the SAS Viya user such as cost and pause/unpause operations. It uses the kubectl-cost krew plugin, and presents a simple menu with some kubecost options. But also allows the user the environment in the container to execute their own kubectl-cost commands.
| Warning: This will deploy kubecost on your cluster if it is not already running. |
|---|
| Do: 'helm uninstall kubecost -n kubecost' to clean up |
|---|
Please see much more here: https://www.kubecost.com/ and here https://github.com/kubecost/kubectl-cost
az login
sudo docker run -it --rm -v ~/.kube/:/root/.kube rwellum/viya_utils:latestgcloud auth application-default login
docker run -it --rm -v ~/.kube/:/root/.kube -v ~/.config/gcloud:/root/.config/gcloud rwellum/viya_utils:latestTBD
sudo bash -c "docker system prune -f \
&& docker rmi --force rwellum/viya_utils:latest \
&& docker build -t rwellum/viya_utils:latest . --no-cache && \
docker push rwellum/viya_utils:latest"Warning removes everything...
sudo docker system prune -ahelm uninstall kubecost -n kubecost- Add pause and unpause
Stop a SAS Viya DeploymentTo stop your SAS Viya deployment, create a new job that runs immediately from the sas-stop-all CronJob:
kubectl create job sas-stop-all-`date +%s` --from cronjobs/sas-stop-all -n
name-of-namespaceStart a SAS Viya DeploymentTo start your SAS Viya deployment, create a new job that runs immediately from the sas-start-all CronJob:
kubectl create job sas-start-all-`date +%s` --from cronjobs/sas-start-all -n name-of-namespace