Filing a Support Request
If you have a support plan with Posit and would like to file a request for help with your Posit Connect deployment on Kubernetes, please execute the following script and attach the resulting diagnostics to your ticket.
Using this script requires that the deployment was created with the helm upgrade --install command.
posit-connect-run-diagnostics-k8s.sh
#!/usr/bin/env bash
# Copyright (C) 2020 by Posit Software, PBC.
set -euxo pipefail
NAMESPACE="${1:-rstudio-connect}"
RELEASE_NAME=$(helm list -n $NAMESPACE -o yaml | grep "chart: rstudio-connect-[0-9]" -A1 | grep name | awk '{print $2}')
echo "### Kubernetes version ###"
kubectl version
echo
echo "### Helm version ###"
helm version
echo
echo "### Helm releases (namespace: $NAMESPACE) ###"
helm list -n $NAMESPACE
echo
echo "### Server logs ###"
kubectl logs -l app.kubernetes.io/name=rstudio-connect -n $NAMESPACE --ignore-errors --prefix --tail=-1 --all-pods --container=connect
echo
echo "### Server pod events ###"
for pod in $(kubectl get pods -n $NAMESPACE -l app.kubernetes.io/name=rstudio-connect -o jsonpath='{.items[*].metadata.name}'); do
echo "#### Pod events: $pod"
kubectl get events -n $NAMESPACE --field-selector involvedObject.kind=Pod,involvedObject.name=$pod --sort-by=.lastTimestamp
echo
done
echo
echo "## Content logs ###"
for pod in $(kubectl get pods -n $NAMESPACE -l connect.rstudio.com/content-guid -o jsonpath='{.items[*].metadata.name}'); do
echo
echo "#### Pod events: $pod"
kubectl get events -n $NAMESPACE --field-selector involvedObject.kind=Pod,involvedObject.name=$pod --sort-by=.lastTimestamp
echo
echo "#### Pod logs: $pod"
kubectl logs -n $NAMESPACE --tail=50 $pod
doneTo produce a diagnostic file for your support ticket:
Save the above script to a file called
posit-connect-run-diagnostics-k8s.shMake the script executable:
Terminal
chmod 750 ./posit-connect-run-diagnostics-k8s.shInvoke the script and save the output to a file:
Terminal
./posit-connect-run-diagnostics-k8s.sh > posit-connect-diagnostic-info-k8s.txtReview your
values.yamlfor any sensitive values!Attach the script output
posit-connect-diagnostic-info-k8s.txtand yourvalues.yamlto the support ticket.Noteposit-connect-run-diagnostics-k8s.shaccepts an optional argument which can be used to provide a namespace other thanrstudio-connect. This allows you to invoke the script with a non-default namespace:Terminal
./posit-connect-run-diagnostics-k8s.sh my-custom-namespace > posit-connect-diagnostic-info-k8s.txt