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.

Note

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
done

To produce a diagnostic file for your support ticket:

  1. Save the above script to a file called posit-connect-run-diagnostics-k8s.sh

  2. Make the script executable:

    Terminal
    chmod 750 ./posit-connect-run-diagnostics-k8s.sh
  3. Invoke the script and save the output to a file:

    Terminal
    ./posit-connect-run-diagnostics-k8s.sh > posit-connect-diagnostic-info-k8s.txt
  4. Review your values.yaml for any sensitive values!

  5. Attach the script output posit-connect-diagnostic-info-k8s.txt and your values.yaml to the support ticket.

    Note

    posit-connect-run-diagnostics-k8s.sh accepts an optional argument which can be used to provide a namespace other than rstudio-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