The "dev guide is not working" any more
After make run, then apply the sample CR, it failed with KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
{"controller": "cloudshell", "controllerGroup": "cloudshell.cloudtty.io", "controllerKind": "CloudShell", "cloudShell": {"name":"local-cluster-sample","namespace":"default"}, "namespace": "default", "name": "local-cluster-sample", "reconcileID": "848b38e1-3e8e-40e0-a3ed-47843ceb2581"}
1.6611414647583098e+09 ERROR Reconciler error {"controller": "cloudshell", "controllerGroup": "cloudshell.cloudtty.io", "controllerKind": "CloudShell", "cloudShell": {"name":"local-cluster-sample","namespace":"default"}, "namespace": "default", "name": "local-cluster-sample", "reconcileID": "848b38e1-3e8e-40e0-a3ed-47843ceb2581", "error": "unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined", "errorVerbose": "unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
github.com/cloudtty/cloudtty/controllers.GenerateKubeconfigInCluster
\t/root/cloudtty/controllers/cloudshell_controller.go:730
github.com/cloudtty/cloudtty/controllers.(*CloudShellReconciler).CreateCloudShellJob
\t/root/cloudtty/controllers/cloudshell_controller.go:213
github.com/cloudtty/cloudtty/controllers.(*CloudShellReconciler).Reconcile
\t/root/cloudtty/controllers/cloudshell_controller.go:119
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
\t/root/work/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:121
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
\t/root/work/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:320
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
\t/root/work/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
\t/root/work/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:234
runtime.goexit
Even I added
export KUBERNETES_SERVICE_HOST=https://x.y.z.w
export KUBERNETES_SERVICE_PORT=6443
then do make run
still failed :
open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
maybe we will have to find a new way to do debug work.. should I find a way to generate those 2 files locally ?
tokenFile = "/var/run/secrets/kubernetes.io/serviceaccount/token"
rootCAFile = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
@calvin0327
@panpan0000 If we run the program locally, because we are outside the cluster, operator cannot generate kubeconfig for us. In other words, to run outside the cluster, we must specify configmap of kubeconfig.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has not seen any activity since it was marked stale. Closing.