How to set sudo privilege with public jupyter notebook image

I’m currently using Google Cloud console deployed in a kubernete cluster. But it’s by default no root permission in the notebook server. I have tried to use other images such as jupyter/datascience-notebook where you can allow sudo by setting the parameters. The docker command is

docker run -it --rm -p 8888:8888 --user root -e NB_GID=100 -e GEN_CERT=yes -e GRANT_SUDO=yes jupyter/datascience-notebook

But I have to use yaml file to deploy the server in a cluster. The question is how to convert this docker command to a StatefulSet yaml file? Or are there other suggestions which allows sudo in a jupyter notebook server in Kubernetes?