Trying to get the hang of the relationships betwee...
# kubernetes
b
Trying to get the hang of the relationships between k8s and kx - I don't see how kx can set the context for the cluster in the kubeconfig things should be applied to, is the intention that I set up k8s.Provider first to lock down the context and then pass that as a provider: argument to kx?
b
Yes. So for example if I want to use the kx library to create a secret, I'd do the following:
Copy code
const provider = new k8s.Provider("provider", {
  kubeconfig: config.kubeconfig,
});

const mySecret = new kx.Secret("mySecret", {
  metadata: { namespace: "mynamespace" },
  stringData: { key: "secretdata" },
}, { provider });
b
excellent - that seems very reasonable 🙂
b
We do like being reasonable 🙂
Basically, kubernetesx is an abstraction over the top of the kubernetes provider (similar to crosswalk / aws) to give you useful defaults so you can get started a lot quicker