GCP
Welcome to the Google Cloud SDK! Run "gcloud -h" to get the list of available commands.¶
Welcome! This command will take you through the configuration of gcloud.
Your current configuration has been set to: [default]
You can skip diagnostics next time by using the following flag: gcloud init --skip-diagnostics
Network diagnostic detects and fixes local network connection issues. Checking network connection...done. Reachability Check passed. Network diagnostic passed (1/1 checks passed).
You must log in to continue. Would you like to log in (Y/n)? y
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=32555940559.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&state=mIuIDMtF2RQJ3wF48J8hfOCNMn891X&access_type=offline&code_challenge=Qu36aIHOjw35AZyQ3apq5InU-mIVksTViB6tKbbQU5g&code_challenge_method=S256
You are logged in as: [yudady@gmail.com].
Pick cloud project to use: [1] 353980 [2] gin-ger [3] ginger-lin [4] lin-ginger [5] lin-kevin [6] lin-tommy [7] tommy-lin [8] unistar-dev-v1 [9] yu-dady [10] yudady [11] Create a new project Please enter numeric choice or text value (must exactly match list item): 8
Your current project has been set to: [unistar-dev-v1].
Do you want to configure a default Compute Region and Zone? (Y/n)? y
Which Google Compute Engine zone would you like to use as project default? If you do not specify a zone via a command line flag while working with Compute Engine resources, the default is assumed. [1] us-east1-b [2] us-east1-c [3] us-east1-d [4] us-east4-c [5] us-east4-b [6] us-east4-a [7] us-central1-c [8] us-central1-a [9] us-central1-f [10] us-central1-b [11] us-west1-b [12] us-west1-c [13] us-west1-a [14] europe-west4-a [15] europe-west4-b [16] europe-west4-c [17] europe-west1-b [18] europe-west1-d [19] europe-west1-c [20] europe-west3-c [21] europe-west3-a [22] europe-west3-b [23] europe-west2-c [24] europe-west2-b [25] europe-west2-a [26] asia-east1-b [27] asia-east1-a [28] asia-east1-c [29] asia-southeast1-b [30] asia-southeast1-a [31] asia-southeast1-c [32] asia-northeast1-b [33] asia-northeast1-c [34] asia-northeast1-a [35] asia-south1-c [36] asia-south1-b [37] asia-south1-a [38] australia-southeast1-b [39] australia-southeast1-c [40] australia-southeast1-a [41] southamerica-east1-b [42] southamerica-east1-c [43] southamerica-east1-a [44] asia-east2-a [45] asia-east2-b [46] asia-east2-c [47] asia-northeast2-a [48] asia-northeast2-b [49] asia-northeast2-c [50] asia-northeast3-a Did not print [27] options. Too many options [77]. Enter "list" at prompt to print choices fully. Please enter numeric choice or text value (must exactly match list item): list [1] us-east1-b [2] us-east1-c [3] us-east1-d [4] us-east4-c [5] us-east4-b [6] us-east4-a [7] us-central1-c [8] us-central1-a [9] us-central1-f [10] us-central1-b [11] us-west1-b [12] us-west1-c [13] us-west1-a [14] europe-west4-a [15] europe-west4-b [16] europe-west4-c [17] europe-west1-b [18] europe-west1-d [19] europe-west1-c [20] europe-west3-c [21] europe-west3-a [22] europe-west3-b [23] europe-west2-c [24] europe-west2-b [25] europe-west2-a [26] asia-east1-b [27] asia-east1-a [28] asia-east1-c [29] asia-southeast1-b [30] asia-southeast1-a [31] asia-southeast1-c [32] asia-northeast1-b [33] asia-northeast1-c [34] asia-northeast1-a [35] asia-south1-c [36] asia-south1-b [37] asia-south1-a [38] australia-southeast1-b [39] australia-southeast1-c [40] australia-southeast1-a [41] southamerica-east1-b [42] southamerica-east1-c [43] southamerica-east1-a [44] asia-east2-a [45] asia-east2-b [46] asia-east2-c [47] asia-northeast2-a [48] asia-northeast2-b [49] asia-northeast2-c [50] asia-northeast3-a [51] asia-northeast3-b [52] asia-northeast3-c [53] asia-southeast2-a [54] asia-southeast2-b [55] asia-southeast2-c [56] europe-central2-a [57] europe-central2-b [58] europe-central2-c [59] europe-north1-a [60] europe-north1-b [61] europe-north1-c [62] europe-west6-a [63] europe-west6-b [64] europe-west6-c [65] northamerica-northeast1-a [66] northamerica-northeast1-b [67] northamerica-northeast1-c [68] us-west2-a [69] us-west2-b [70] us-west2-c [71] us-west3-a [72] us-west3-b [73] us-west3-c [74] us-west4-a [75] us-west4-b [76] us-west4-c [77] Do not set default zone Please enter numeric choice or text value (must exactly match list item): 26
Your project default Compute Engine zone has been set to [asia-east1-b]. You can change it by running [gcloud config set compute/zone NAME].
Your project default Compute Engine region has been set to [asia-east1]. You can change it by running [gcloud config set compute/region NAME].
Created a default .boto configuration file at [C:\Users\tommy.lin.boto]. See this file and [https://cloud.google.com/storage/docs/gsutil/commands/config] for more information about configuring Google Cloud Storage. Your Google Cloud SDK is configured and ready to use!
- Commands that require authentication will use yudady@gmail.com by default
- Commands will reference project
unistar-dev-v1
by default - Compute Engine commands will use region
asia-east1
by default - Compute Engine commands will use zone
asia-east1-b
by default
Run gcloud help config
to learn how to change individual settings
This gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects.
Run gcloud topic configurations
to learn more.
Some things to try next:
- Run
gcloud --help
to see the Cloud Platform services you can interact with. And rungcloud help COMMAND
to get help on any gcloud command. - Run
gcloud topic --help
to learn about advanced features of the SDK like arg files and output formatting
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud init Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [default] are: accessibility: screen_reader: 'False' compute: region: asia-east1 zone: asia-east1-b core: account: yudady@gmail.com disable_usage_reporting: 'True' project: unistar-dev-v1
Pick configuration to use: [1] Re-initialize this configuration [default] with new settings [2] Create a new configuration Please enter your numeric choice: 1
Your current configuration has been set to: [default]
You can skip diagnostics next time by using the following flag: gcloud init --skip-diagnostics
Network diagnostic detects and fixes local network connection issues. Checking network connection...done. Reachability Check passed. Network diagnostic passed (1/1 checks passed).
Choose the account you would like to use to perform operations for this configuration: [1] yudady@gmail.com [2] Log in with a new account Please enter your numeric choice: 1
You are logged in as: [yudady@gmail.com].
Pick cloud project to use: [1] 353980 [2] gin-ger [3] ginger-lin [4] lin-ginger [5] lin-kevin [6] lin-tommy [7] tommy-lin [8] unistar-dev-v1 [9] yu-dady [10] yudady [11] Create a new project Please enter numeric choice or text value (must exactly match list item): 8
Your current project has been set to: [unistar-dev-v1].
Do you want to configure a default Compute Region and Zone? (Y/n)? n
Your Google Cloud SDK is configured and ready to use!
- Commands that require authentication will use yudady@gmail.com by default
- Commands will reference project
unistar-dev-v1
by default Rungcloud help config
to learn how to change individual settings
This gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects.
Run gcloud topic configurations
to learn more.
Some things to try next:
- Run
gcloud --help
to see the Cloud Platform services you can interact with. And rungcloud help COMMAND
to get help on any gcloud command. - Run
gcloud topic --help
to learn about advanced features of the SDK like arg files and output formatting
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud projects list PROJECT_ID NAME PROJECT_NUMBER 353980 353980 874464665841 gin-ger gin-ger 394828453878 ginger-lin ginger-lin 273919078369 lin-ginger lin-ginger 969672917520 lin-kevin lin-kevin 761438342969 lin-tommy lin-tommy 825895022344 tommy-lin tommy-lin 767101075796 unistar-dev-v1 unistar-dev-v1 174389549528 yu-dady yu-dady 404783554387 yudady yudady 868309925832
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud components install kubectl ERROR: gcloud crashed (SSLError): HTTPSConnectionPool(host='dl.google.com', port=443): Max retries exceeded with url: /dl/cloudsdk/channels/rapid/components-v343.0.0.json (Caused by SSLError(SSLError("bad handshake: SysCallError(10054, 'WSAECONNRESET')")))
If you would like to report this issue, please run the following command: gcloud feedback
To check gcloud for common problems, please run the following command: gcloud info --run-diagnostics
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud components update
To help improve the quality of this product, we collect anonymized usage data and anonymized stacktraces when crashes are encountered; additional information is available at https://cloud.google.com/sdk/usage-statistics. This data is handled in accordance with our privacy policy https://cloud.google.com/terms/cloud-privacy-notice. You may choose to opt in this collection now (by choosing 'Y' at the below prompt), or at any time in the future by running the following command:
gcloud config set disable_usage_reporting false
Do you want to opt-in (y/N)? y
Beginning update. This process may take several minutes.
All components are up to date.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud components install kubectl
Restarting command: $ gcloud components install kubectl
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud components install kubectl
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get pods -n app Unable to connect to the server: dial tcp [::1]:443: connectex: No connection could be made because the target machine actively refused it.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl config get-contexts CURRENT NAME CLUSTER AUTHINFO NAMESPACE
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get pods -n app Unable to connect to the server: dial tcp [::1]:443: connectex: No connection could be made because the target machine actively refused it.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud config set project unistar-dev-v1 Updated property [core/project].
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get pods -n app Unable to connect to the server: dial tcp [::1]:443: connectex: No connection could be made because the target machine actively refused it.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl config view apiVersion: v1 clusters: null contexts: null current-context: "" kind: Config preferences: {} users: null
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud --project unistar-dev-v1 container clusters get-credentials ubpay-dev --zone asia-east2-b ERROR: (gcloud) The project property must be set to a valid project ID, [unistar-dev-v1] is not a valid project ID. To set your project, run:
$ gcloud config set project PROJECT_ID
or to unset it, run:
$ gcloud config unset project
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud --project unistar-dev-v1 container clusters get-credentials ubpay-dev --zone asia-east2-b ERROR: (gcloud) The project property must be set to a valid project ID, [unistar-dev-v1] is not a valid project ID. To set your project, run:
$ gcloud config set project PROJECT_ID
or to unset it, run:
$ gcloud config unset project
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK> C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK> C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK> C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK> C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK> C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud --project unistar-dev-v1 container clusters get-credentials ubpay-dev --zone asia-east2-b Fetching cluster endpoint and auth data. kubeconfig entry generated for ubpay-dev.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl config view apiVersion: v1 clusters: - cluster: certificate-authority-data: DATA+OMITTED server: https://35.220.245.154 name: gke_unistar-dev-v1_asia-east2-b_ubpay-dev contexts: - context: cluster: gke_unistar-dev-v1_asia-east2-b_ubpay-dev user: gke_unistar-dev-v1_asia-east2-b_ubpay-dev name: gke_unistar-dev-v1_asia-east2-b_ubpay-dev current-context: gke_unistar-dev-v1_asia-east2-b_ubpay-dev kind: Config preferences: {} users: - name: gke_unistar-dev-v1_asia-east2-b_ubpay-dev user: auth-provider: config: access-token: ya29.a0AfH6SMBoHvQC8xmvUEs3FnOyKWnNoO78Z7BAc9HaW7ATPo0QYJ7s2KTeTPJceTl1PBkUu3nt8ZpasMR-EUoaPFLDzih8cMsuTUMeMWws8oxd2GKE7JPNfqAaaUQihto1hq7pqWWol97FViZafpNVu_lbDlj8dmow20CUVg cmd-args: config config-helper --format=json cmd-path: C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd expiry: "2021-06-08T03:17:58Z" expiry-key: '{.credential.token_expiry}' token-key: '{.credential.access_token}' name: gcp
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get pods -n app Unable to connect to the server: dial tcp 35.220.245.154:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud auth application-default login Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&state=9f9pqmHaF9Mb6sQnxrYmWxWKTGZBD0&access_type=offline&code_challenge=yM83YzwGkFapR586g1xpRm7ASD6l4MPLex0F9FwVjxY&code_challenge_method=S256
Credentials saved to file: [C:\Users\tommy.lin\AppData\Roaming\gcloud\application_default_credentials.json]
These credentials will be used by any library that requests Application Default Credentials (ADC).
WARNING: C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin..\lib\third_party\google\auth_default.py:70: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK without a quota project. You might receive a "quota exceeded" or "API not enabled" error. We recommend you rerun gcloud auth application-default login
and make sure a quota project is added. Or you can use service accounts instead. For more information about service accounts, see https://cloud.google.com/docs/authentication/
warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING)
Quota project "unistar-dev-v1" was added to ADC which can be used by Google client libraries for billing and quota. Note that some services may still bill the project owning the resource.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get pods -n app
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud --project unistar-dev-v1 container clusters get-credentials ubpay-dev --zone asia-east2-b Fetching cluster endpoint and auth data. kubeconfig entry generated for ubpay-dev.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK> C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud config set project unistar-dev-v1 C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK> C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get pods -n app Unable to connect to the server: dial tcp 35.220.245.154:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud config set project unistar-dev-v1
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get secrets -n app Unable to connect to the server: dial tcp 35.220.245.154:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get secrets -n app NAME TYPE DATA AGE backoffice-token-44mmv kubernetes.io/service-account-token 3 17d build-token-g2rfg kubernetes.io/service-account-token 3 17d db-migration-secret Opaque 2 14d default-token-lclb2 kubernetes.io/service-account-token 3 17d kms-token-rn2rj kubernetes.io/service-account-token 3 17d monitor-token-47488 kubernetes.io/service-account-token 3 17d order-db-secret Opaque 2 14d secret-service-token-k55zw kubernetes.io/service-account-token 3 17d storage-viewer-token-ktfq6 kubernetes.io/service-account-token 3 17d user-db-secret Opaque 2 14d
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud --project unistar-dev-v1 container clusters get-credentials ubpay-dev-v2 --zone asia-east2-b Fetching cluster endpoint and auth data. kubeconfig entry generated for ubpay-dev-v2.
Updates are available for some Cloud SDK components. To install them, please run: $ gcloud components update
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK> C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>gcloud components update Beginning update. This process may take several minutes.
Restarting command: $ gcloud components update
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get secrets -n app NAME TYPE DATA AGE backoffice-token-zxlfb kubernetes.io/service-account-token 3 46m build-token-nw7xq kubernetes.io/service-account-token 3 46m db-migration-secret Opaque 2 57m default-token-nxl6b kubernetes.io/service-account-token 3 57m kms-token-t5srp kubernetes.io/service-account-token 3 46m monitor-token-g7f2w kubernetes.io/service-account-token 3 46m order-db-secret Opaque 2 56m secret-service-token-lqdlr kubernetes.io/service-account-token 3 46m storage-viewer-token-sdbs2 kubernetes.io/service-account-token 3 46m user-db-secret Opaque 2 57m
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>kubectl get pods -n app NAME READY STATUS RESTARTS AGE admin-site-d77cb6444-hkt8g 1/1 Running 0 2m55s build-0 1/1 Running 0 48m cache-77fc9447d9-2tp5x 1/1 Running 0 48m frontend-build-m5jhm-6k82n 1/1 Running 0 2m25s kafka-0 1/1 Running 1 47m log-collector-6b677b76f7-ql9ts 1/1 Running 0 48m log-es-0 1/1 Running 0 48m log-kafka-0 1/1 Running 0 47m log-kibana-5877447575-75x6p 1/1 Running 0 48m log-processor-8658798dd-xgqm7 1/1 Running 0 20m log-zookeeper-0 1/1 Running 0 47m monitor-864cd95d89-tdlvh 1/1 Running 0 48m order-service-559f4db5b6-fx5kc 1/1 Running 0 22m order-service-57c6567dd8-5r9xc 0/1 Running 0 28s partner-site-7ddc6c8f68-n5xtv 1/1 Running 0 2m55s user-service-5566dcc597-vxw8f 1/1 Running 0 7m52s user-service-6bdfbd9649-6tpwh 0/1 Running 0 29s website-96f65789c-bmpjw 1/1 Running 0 2m56s zookeeper-0 1/1 Running 0 47m
C:\Users\tommy.lin\AppData\Local\Google\Cloud SDK>