Using the commands pasted by someone else on the old forums, I came up with a script to help me run the NextCloud php occ CLI:
#!/bin/bash
# Script to easily enter into the NextCloud shell
echo ""
echo "*******NOTE*******"
echo ""
echo "To run occ - once within the NextCloud instance shell, run:"
echo "su"
echo "su -m www-data -c 'php occ'"
echo ""
# e.g., ix-nextcloud
NEXTCLOUD_NAMESPACE="$1"
NEXTCLOUD_POD_NAME=$(k3s kubectl get -n $NEXTCLOUD_NAMESPACE --no-headers pods | grep -v -e "postgres" -e "cron" -e "redis" | cut -d ' ' -f1|tr '\n' ' ')
echo $NEXTCLOUD_POD_NAME
k3s kubectl exec -n $NEXTCLOUD_NAMESPACE --stdin --tty $NEXTCLOUD_POD_NAME -- /bin/bash
The script makes it easier, but it is overall still a bit annoying in my opinion… anyone else have anything cleaner?