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
#!/bin/bash | |
# This script removes all tags in specified namespaces from local registry | |
# after this script run, run the following script to free the space: | |
# bin/registry garbage-collect /etc/docker/registry/config.yml | |
# | |
# Examples (dryrun and execution): | |
# ./delete_registry_repos.sh -r http://registry.local:5000 -n dev | |
# ./delete_registry_repos.sh -r https://registry.example.com -n dev,pr -d | |
# | |
# You can set the default value in the script so no input for -r -n |
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
#!/bin/bash | |
# Check if kubectl is configured to connect to the AKS cluster | |
if ! command -v kubectl &> /dev/null | |
then | |
echo "kubectl could not be found. Please install kubectl and configure it to access your AKS cluster." | |
exit 1 | |
fi | |
# Get the list of pods that are either in Completed or Error state |
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
#!/bin/bash | |
# Check if kubectl is configured to connect to AKS cluster | |
if ! command -v kubectl &> /dev/null | |
then | |
echo "kubectl could not be found. Please install kubectl and configure it to access your AKS cluster." | |
exit 1 | |
fi | |
# Get the list of all pods in the cluster |
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
#!/bin/bash | |
# This script removes tags from local registry, keeping just the n most recents tags | |
# after this script run, run the following script to free the space: | |
# bin/registry garbage-collect /etc/docker/registry/config.yml | |
# | |
# Examples (dryrun and execution): | |
# ./delete_registry_digests.sh -r http://registry.local:5000 -i test -k 0 | |
# ./delete_registry_digests.sh -r https://registry.example.com -i dev/test -e latest -d | |
# | |
# After deleting all the tags, run garbage collection: |