What I’ve tried so far:
Kubernetes is configured using ~/.kube/config
, which is a read-only file. chmod o+w .kube/config
returns Operation not permitted
.
kubectl set env TEST=value
returns a help message indicating that set env is not an available command.
Setting the env var KUBECONFIG=.kube.config.file
before launching kube, or within the kube environment, seems to have no effect on env vars, or on the output of kubectl config view
. (.kube.config.file contains:
{
"env": [
{
"name": "TEST",
"value": "Working"
}
]
}
kubectl config set current-context .kube.config.file
gives
open /data/project/citations-dev/.kube/config: operation not permitted
I’ve created a .bashrc
file, following https://askubuntu.com/questions/58814/how-do-i-add-environment-variables, to no avail.
I eventually added .profile as a symbolic link to .bashrc
, which adds environment variables to a shell session, but not, it seems, to the live webserver (which I restarted by running webservice stop
… webservice start
) by which users access the bot interface.