You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we use a cluster with a lot of namespace, and I would like to use a separate context for each.
I have a config file downloaded from Rancher, that defines the cluster, user and a single context. This file obviously contains my private token
I would like to use a separate config with only additional contexts defined. We would like to maintain this file centrally, so all Kubernetes admins can git pull this file to have all context definitions updated.
When I try this now, kubie complains:
contexts.yml: missing fieldclustersat line 4 column 9
since it is not a complete config file.
The contexts.yml file looks like this:
---
# list of all cluster-namespace combinations for cluster production
contexts:
- name: "production-namespace1"
context:
user: "myuser"
cluster: "production"
namespace: "namespace1"
- name: "production-namespace2"
context:
user: "myuser"
cluster: "production"
namespace: "namespace2"
- name: "production-namespace3"
context:
user: "myuser"
cluster: "production"
namespace: "namespace3"
The use-case here is that we do not have rights on the cluster to get all namespaces, so selecting a context with a set namespace makes our life much easier.
The text was updated successfully, but these errors were encountered:
I stumbled upon this and have a similar problem. Some clusters that I access doesn't allow listing namespaces. One thing that you can do is to merge your config with the pulled config using e.q. yq as part of the pulling. Or commit your config to the git managed config but not push it. It will get automatically merged when you pull.
One other way would be if Kubie could support getting namespaces from file (or script available on the path) rather than using kubectl get namespaces.
Hi,
we use a cluster with a lot of namespace, and I would like to use a separate context for each.
I have a config file downloaded from Rancher, that defines the cluster, user and a single context. This file obviously contains my private token
I would like to use a separate config with only additional contexts defined. We would like to maintain this file centrally, so all Kubernetes admins can git pull this file to have all context definitions updated.
When I try this now, kubie complains:
contexts.yml: missing field
clustersat line 4 column 9
since it is not a complete config file.
The contexts.yml file looks like this:
The use-case here is that we do not have rights on the cluster to get all namespaces, so selecting a context with a set namespace makes our life much easier.
The text was updated successfully, but these errors were encountered: