You are on page 1of 3

-----------------------------------------------------------------------------------

----------
gcloud + release level (optional) + component + entity + operation + positional
args + flags
-----------------------------------------------------------------------------------
----------

gcloud:
gcloud command-line tool is a tree; non-leaf nodes are command groups leaf
nodes are commands

release level (optional):


refers to the command’s release status
(alpha, beta commands)

component:
refers to the different Google Cloud services
(compute, app)

Entity:
refers to the plural form of an element or collection of elements under a
component.
(disks, firewalls, images, instances, regions, zones for compute)

Operation:
refers to the imperative verb form of the operation to be performed on the
entity.
(describe, list, create/update, delete/clear, import, export, copy, remove,
add, reset, restart, restore, run, and deploy)

Positional args:
refer to the required, order-specific arguments needed to execute the
command.
gcloud compute instances create <required information>

Flags:
refer to the additional arguments, --flag-name(=value), passed in to the
command after positional args.
--machine-type=<MACHINE_TYPE> and --preemptible are optional flags for gcloud
compute instances create.

-----------------------------------------------------------------------------------
----------
Actual Content from:
https://cloud.google.com/sdk/docs/cheatsheet

Additional Information:
https://cheatsheet.dennyzhang.com/cheatsheet-gcp-a4
https://cloud.google.com/sdk/docs/images/gcloud-cheat-sheet.pdf

gcloud scripting:
https://cloud.google.com/sdk/docs/scripting-gcloud
-----------------------------------------------------------------------------------
----------

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++
| GCP & KUBERNETES:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++

alias k='kubectl'
alias ksvc='kubectl get svc'
alias kpod='kubectl get pods'
alias kpodall='kubectl get pods --all-namespaces'
alias kdep='kubectl get deployments'
alias kdesc='kubectl describe'
alias kns='kubectl get namespaces'
alias cl='clear'
alias gcssh='gcloud compute ssh'
alias gclist='gcloud compute instances list'

kubectl get services --kubeconfig ./kubeconfig

INITIALISE:
gcloud init

QA:
## gcloud container clusters get-credentials tenfold-newqa-cluster --zone=us-
east1-b --project=prokopto-poc-lab
gcloud container clusters get-credentials newqa-us-east1-privcluster01
--region us-east1 --project prokopto-poc-lab
kubectl config rename-context gke_prokopto-poc-lab_us-east1-b_tenfold-newqa-
cluster tenfold-gcp-newqa

DEV:
gcloud container clusters get-credentials tenfold-audit-east-b-1 --zone=us-
east1-b --project=tenfold-developer
kubectl config rename-context gke_tenfold-developer_us-east1-b_tenfold-audit-
east-b-1 tenfold-gcp-dev

PROD:
gcloud container clusters get-credentials tenfold-apps-east-c-2 --zone us-
east1-c --project tenfold-backend-services
kubectl config rename-context gke_tenfold-backend-services_us-east1-
c_tenfold-apps-east-c-2 tenfold-gcp-prod

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++
curl --location --request POST 'https://search-tenfold-dev-
sdszfnu3skai2yn66jupghdm6e.us-east-1.es.amazonaws.com/tenfold/_mapping/calls' \
--header 'X-Amz-Content-Sha256:
beaead3198f7da1e70d03ab969765e0821b24fc913697e929e726aeaebf0eba3' \
--header 'X-Amz-Date: 20210402T173102Z' \
--header 'Authorization: AWS4-HMAC-SHA256
Credential=AKIAJX3V7KHBZUSRKICA/20210402/us-east-1/es/aws4_request,
SignedHeaders=host;x-amz-content-sha256;x-amz-date,
Signature=c32c9635828eae9de700f83b487cfe4b233a69a55c0b101e5b4e76a2e8b5d7ca' \
--header 'Content-Type: text/plain' \
--data-raw '{
"properties" : {
"phoneNumberModifiedAt" : {"type" : "date"}
}
}'

1. create workspace
2. download client for amazon workspace i.e clients.amazonworkspaces.com
3. it will ask registeration code put that code, you will get it in mail, or if you
will look into workspace you will find thee as well
4. userName and pwd
plz follow these step and you will connect workspace

You might also like