Skip to main content

Managing Pyrsia on Kubernetes

Prerequisites

GKE - Google

EKS - Amazon

Interacting with the clusters

ActionCommand
List current cluster connectionkubectl config view --minify -o jsonpath='{.clusters[].name}'
List current contextskubectl config get-contexts
Switch to another clusterkubectl config use-context <context name>
List running podskubectl get pods -n pyrsia-node
List public ip assigned to podskubectl get svc -n pyrsia-node
Get logs for podkubectl logs -n pyrsia-node pyrsia-node-0
"ssh" to podkubectl exec -it -n pyrsia-node pyrsia-node-0 -- bash
"reboot" a podkubectl delete pod -n pyrsia-node pyrsia-node-0
Get image tag for a podkubectl describe pod -n pyrsia-node pyrsia-node-0
Get ingress detailskubectl describe svc -n pyrsia-node pyrsia-node-0

Using helm to deploy updates

The helm charts are automatically published by the Github Actions to the http://helmrepo.pyrsia.io site. ArtifactHub pulls in chart updates every half hour.

Details about the Chart Values and Installation steps are documented in the chart's ReadMe. ArtifactHub renders the ReadMe on the Prysia Package site.

  1. Add the remote repo location to helm helm repo add pyrsia-nightly http://helmrepo.pyrsia.io

  2. Fetch the latest charts helm repo update

  3. Set you cluster connection kubectl config use-context <context name>

  4. Deployment

    • Nightly

      helm upgrade --install node1 -n pyrsia-node pyrsia-nightly/pyrsia-node --set "k8s_provider=gke" --set "p2pkeys.kms_key_id=projects/pyrsia-sandbox/locations/global/keyRings/pyrsia-keyring/cryptoKeys/pyrsia-p2p-key" --set "dnsname=nightly.pyrsia.link" --set "bootdns=nightly.pyrsia.link"  --set "replicaCount=1" --set "buildnode=http://35.193.148.20:8080" --version "0.2.0+2438"
    • Production

      helm upgrade --install node1 -n pyrsia-node pyrsia-nightly/pyrsia-node --set "k8s_provider=gke" --set "p2pkeys.kms_key_id=projects/pyrsia-sandbox/locations/global/keyRings/pyrsia-keyring/cryptoKeys/pyrsia-p2p-key"   --set "replicaCount=1"  --set "buildnode=http://34.134.11.239:8080" --version "0.2.0+2438"

    Note: Change the --version of the chart to reflect the image tag you want to deploy. The image tag and chart version are kept in sync.

Verify the deployments using kubectl commands.

Other helm commands

  • List Deployments

    helm list

  • Delete Deployment

    helm delete -n pyrsia-node node1

Cheatsheets