When you run an application using kubeconfig on a Python 3.12 venv, then you run into an error:
ModuleNotFoundError: No module named 'distutils'
It seems as if the distutils package has been removed in Python 3.12 and needs to be installed manually:
https://stackoverflow.com/a/77638756/1518964