mirror of
https://github.com/autistic-symposium/shell-whiz-toolkit.git
synced 2025-05-12 11:42:20 -04:00
ad gcloud scripts
This commit is contained in:
parent
ce3251b9fe
commit
0402a432cf
5 changed files with 43 additions and 0 deletions
6
get_cloudsql_instances.sh
Normal file
6
get_cloudsql_instances.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
for x in $(gcloud projects list | tail -n +2 | awk '{ print $1}');
|
||||
do
|
||||
gcloud sql instances list --project $x
|
||||
done
|
12
get_gae_apps.sh
Normal file
12
get_gae_apps.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
projects=$(gcloud projects list | tail -n +2 | awk '{ print $1}')
|
||||
|
||||
list_app () {
|
||||
gcloud app services list --project $1 2>&1 | grep -v ERROR
|
||||
}
|
||||
|
||||
for x in $projects;
|
||||
do
|
||||
list_app $x
|
||||
done
|
9
get_kube_clusters.sh
Normal file
9
get_kube_clusters.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
projects=$(gcloud projects list | tail -n +2 | awk '{ print $1}');
|
||||
|
||||
for x in $projects;
|
||||
do
|
||||
echo $x
|
||||
gcloud container clusters list --project $x;
|
||||
done
|
9
get_kube_master_ips.sh
Normal file
9
get_kube_master_ips.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
projects=$(gcloud projects list | tail -n +2 | awk '{ print $1}');
|
||||
|
||||
for x in $projects;
|
||||
do
|
||||
project_json=$(gcloud container clusters list --project $x --format json)
|
||||
echo $project_json | jq -e -r '.[] | .endpoint'
|
||||
done
|
7
get_public_ips.sh
Normal file
7
get_public_ips.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
for x in $(gcloud projects list | tail -n +2 | awk '{ print $1}');
|
||||
do
|
||||
ip_list=$(gcloud compute instances list --project $x --format json)
|
||||
gcloud compute instances list --project $x --format json | jq -r '.[] | .networkInterfaces[] | .accessConfigs[] | .natIP';
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue