Google Cloud service account notes

Most of these notes were created from configuring the kube-cert-manager. setting up Google Cloud SDK (gcloud config) This first section touches upon configuring Google Cloud, the Google Cloud SDK, and the GKE cluster. Create an example project in Google Cloud, then configure your gcloud CLI: gcloud config configurations create EXAMPLE gcloud config set project EXAMPLE-123456 gcloud config set account youremail@example.org creating the GKE cluster With the Google Cloud account setup and the Google Cloud SDK installed and configured, Create a Kubernetes cluster.

Elasticsearch curl commands and references

A collection of Elasticsearch curl commands and references. Get Cluster Health cluster health: curl -s http://localhost:9200/_cluster/health?pretty Get indices indices: curl -s http://localhost:9200/_cat/indices Get shards shards: curl -s http://localhost:9200/_cat/shards Stuck Unassigned Shards Sometimes shards fail to assign and they hit a maximum retry. For example, say there’s a replica shard that is unassigned and won’t assign. Running this command has it retry: curl -s -XPOST 'localhost:9200/_cluster/reroute?retry_failed' -H 'Content-Type: application/json' -d' { "commands" : [ { "allocate_replica" : { "index" : "INDEXNAME", "shard" : 0, "node" : "NODENAME" } } ] } ' In the above example, INDEXNAME is the index, NODENAME is the node.

sed notes and examples

The Unix command sed and some examples that I’ve used. sed cheatsheat : # label = # line_number a # append_text_to_stdout_after_flush b # branch_unconditional c # range_change d # pattern_delete_top/cycle D # pattern_ltrunc(line+nl)_top/cycle g # pattern=hold G # pattern+=nl+hold h # hold=pattern H # hold+=nl+pattern i # insert_text_to_stdout_now l # pattern_list n # pattern_flush=nextline_continue N # pattern+=nl+nextline p # pattern_print P # pattern_first_line_print q # flush_quit r # append_file_to_stdout_after_flush s # substitute t # branch_on_substitute w # append_pattern_to_file_now x # swap_pattern_and_hold y # transform_chars sed examples # grabs an SSH fingerprint (aka, using ssh-keyscan or the AWS System Log).