mirror of
https://github.com/autistic-symposium/mev-toolkit.git
synced 2025-04-28 11:46:13 -04:00
903 B
903 B
Deployment of geth in GCP + Kubernetes
Deployment
NAMESPACE=ethereum
kubectl create namespace ${NAMESPACE}
kubectl apply --filename=deployment.yaml --namespace=${NAMESPACE}
Accessing node without opening firewall
SERVICE=ethereum
NAMESPACE=ethereum
NODE=$(\
kubectl get nodes \
--output=jsonpath='{.items[0].metadata.name}')
PORT=$(\
kubectl get services/${SERVICE} \
--namespace=${NAMESPACE} \
--output=jsonpath='{.spec.ports[?(@.name=="default")].nodePort}')
echo ${PORT}
gcloud compute ssh <docker container alias> \
--ssh-flag="-L ${PORT}:localhost:${PORT}" \
--project=<project name>
Member connecting
docker run \
--rm \
--interactive \
--tty \
--net=host \
ethereum/client-go attach http://localhost:${PORT}
Dealing with secrets
kubectl create secret generic keystore \
--from-file=path/to/keystore \
--namespace=$NAMESPACE