Kubernetes deployment
Installing Posit Connect within Kubernetes
Install Connect by running:
Terminal
helm upgrade --install rstudio-connect-prod rstudio/rstudio-connect \
--values values.yamlIf you have made changes to your values file and wish to update an existing installation, you can just run the command again.
Use the following command to check the status of Connect:
Terminal
kubectl get pod -l app.kubernetes.io/name=rstudio-connectYou should see output like the following:
NAME READY STATUS RESTARTS AGE
connect-rstudio-connect-5d45d7b9bc-5wrcn 1/1 Running 0 9m50sTroubleshooting startup failures
If your Connect pod is failing to start, use kubectl describe to get diagnostic information:
Terminal
kubectl describe pod -l app.kubernetes.io/name=rstudio-connectThe pod’s Events section shows errors. In this example, Kubernetes repeatedly restarts the pod:
Name: connect-rstudio-connect-79f459f647-8rxzd
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 4m12s default-scheduler Successfully assigned posit-connect/connect-rstudio-connect-79f459f647-8rxzd to node-1
Warning FailedMount 4m12s kubelet MountVolume.SetUp failed for volume "rstudio-connect-config" : failed to sync configmap cache: timed out waiting for the condition
Normal Pulled 3m24s (x4 over 4m9s) kubelet Container image "ghcr.io/rstudio/rstudio-connect:ubuntu2204-2026.04.0" already present on machine
Normal Created 3m24s (x4 over 4m9s) kubelet Created container connect
Normal Started 3m24s (x4 over 4m9s) kubelet Started container connect
Warning BackOff 2m44s (x8 over 4m5s) kubelet Back-off restarting failed containerIf the container fails, check the logs:
Terminal
kubectl logs -f --tail 50 \
-l app.kubernetes.io/name=rstudio-connect \
--container connectThe logs show that Connect cannot reach the Postgres database:
2021/08/04 17:54:55 Configuring licensing to use a local license...
2021/08/04 17:54:55 Using the normalized Server.Address: https://connect.example.com/
2021/08/04 17:54:56 Detected Python version 3.6.5 at /opt/python/3.6.5/bin/python3.6
2021/08/04 17:54:56 Detected R version 3.6.2 at /opt/R/3.6.2/bin/R
2021/08/04 17:54:56 Detected R version 3.6.2 at /opt/R/3.6.2/lib/R/bin/R
2021/08/04 17:54:56 Error: Unable to initialize a connection to the core database: Unable to connect to core DB: dial tcp: lookup postgres.rstudio.com on 10.96.0.10:53: no such host
Deactivating license ...
+ deactivate
+ echo 'Deactivating license ...'
+ /opt/rstudio-connect/bin/license-manager deactivateAccess the dashboard and validate your installation
Your Connect server should now be running. Log in to the dashboard and validate that it is working correctly.
Manual port-forwarding is appropriate for local testing and validation of the installation. Once you have validated the installation, you need to configure an Ingress and public DNS records for Connect. See the post-deployment steps for configuring external access to your Connect installation.
To interact with your new Connect installation, you need to temporarily enable port-forwarding. For example, to use local port 3939:
Terminal
kubectl port-forward svc/rstudio-connect-prod 3939:80You can now point your browser to http://localhost:3939/, register a new account, and log in to Connect.
To verify the correct functionality of your Connect server:
- Deploy content
- Send an email
- Allow access to your Connect servers
Verifying your server requires both administrator and publisher actions. For publisher tasks like deploying content, see the Posit Connect User Guide.
You can now continue to post-deployment steps.