🧠 Prerequisites
Before using this cheatsheet, please ensure that:
- You have
kubectl
andhelm
installed and configured. These can be found in the official Helm and Kubernetes repo below: - You have access to Posit-provided Helm charts or your own configured charts.
- Your Kubernetes cluster is reachable.
🔧 Helm Basics
Add a Helm Repository
Adds a helm repository to install Posit helm charts.
helm repo add rstudio https://helm.rstudio.com
helm repo update
Search for Available Charts
Searches the repositories that you have installed for available charts.
helm search repo rstudio
🚀 Installing Posit Charts
Installs the charts for your selected product.
Posit Workbench
helm install workbench rstudio/rstudio-workbench \ --namespace posit \ --set license.key=YOUR_LICENSE_KEY \ --values workbench-values.yaml
Posit Connect
helm install connect rstudio/rstudio-connect \ --namespace posit \ --set license.key=YOUR_LICENSE_KEY \ --values connect-values.yaml
Posit Package Manager
helm install packagemanager rstudio/rstudio-pm \ --namespace posit \ --set license.key=YOUR_LICENSE_KEY \ --values pm-values.yaml
🔁 Upgrade a Release
Updates an existing release of a chart with a new version or modified configuration
helm upgrade connect rstudio/rstudio-connect \ --namespace posit \ --values connect-values.yaml
🧼 Uninstall a Release
Uninstalls a release and cleans up all relevant Kubernetes objects.
helm uninstall workbench --namespace posit
🛠 Troubleshooting
It helps to obtain the name of your running pods, in order to run commands on them. You can obtain pod names as below:
kubectl get pods
From there, you can obtain application-level logs by running:
kubectl logs <podname>
Pod-level deployment logs can be obtained through:
kubectl describe pods <podname>
You can obtain a shell session into a pod by running the below. This can be useful for troubleshooting pods themselves, and testing the installation of new packages/services:
kubectl exec -it <podname> -- /bin/bash
Restarting the deployment can also help to resolve issues:
kubectl rollout restart <deployment>
It's worth noting that pods launched as part of a deployment will attempt to redeploy if deleted. You can delete pods by running:
kubectl delete pod <podname>
Comments
0 comments
Article is closed for comments.