Danyil Poprotskyi
Danyil Poprotskyi

Reputation: 53

Increase Virtual Memory for Elasticsearch on GKE using cloud build

I have created multi-node cluster on GKE and I was using this shell script for fixing the virtual memory on nodes Set vm.max_map_count=262144 on the nodes of a GKE cluster #k8s. I want it to be executed in my cloud builder but it just returns Permission denied (publickey). on gcloud compute ssh execution. How can I fix it?

Upvotes: 0

Views: 697

Answers (1)

Danyil Poprotskyi
Danyil Poprotskyi

Reputation: 53

Basically in the line

gcloud compute ssh --zone $(zone_by_node $node) $node -- sudo bash -c "'"$@"'" 

set your username before node:

gcloud compute ssh --zone $(zone_by_node $node) username@$node -- sudo bash -c "'"$@"'"

Your username is first part of your email before @.

Upvotes: 1

Related Questions