From d30d3455e6efff2fff913ce26cdf3f3ee938d1a8 Mon Sep 17 00:00:00 2001 From: Moshe Immermam Date: Tue, 29 Oct 2024 12:46:01 +0200 Subject: [PATCH] chore: add kubectl access --- .../docs/installation/saas/kubectl.md | 51 +++++++++++++++++++ mission-control/sidebars.js | 6 +++ 2 files changed, 57 insertions(+) create mode 100644 mission-control/docs/installation/saas/kubectl.md diff --git a/mission-control/docs/installation/saas/kubectl.md b/mission-control/docs/installation/saas/kubectl.md new file mode 100644 index 00000000..4c504cd5 --- /dev/null +++ b/mission-control/docs/installation/saas/kubectl.md @@ -0,0 +1,51 @@ +--- +title: Kubectl Access +--- + +Mission Control SaaS instances are deployed on dedicated [vCluster](https://www.vcluster.com/) instances. + +Mission Control configuration is managed through Kubernetes Custom Resource Definitions (CRDs). Depending on your deployment model, you may need to apply resources directly to the vCluster. To facilitate this, you can download a `kubeconfig` file after authentication. + + + +The access token provided has role-based permissions limited to either [mission-control-reader](https://github.com/flanksource/mission-control-chart/blob/main/chart/templates/rbac.yaml#L130-L143) or [mission-control-writer](https://github.com/flanksource/mission-control-chart/blob/main/chart/templates/rbac.yaml#L145C1-L169C17), based on your selected role. Use this `kubeconfig` file to interact with your Mission Control SaaS instance via `kubectl`. + +:::tip Production +For production environments, it is recommended to use GitOps tools like Argo CD or Flux to manage configurations rather than applying them directly with kubectl. Use the kubeconfig file to configure your GitOps tool to target the Mission Control SaaS instance. +::: + + + +1. Save the kubeconfig to your GitOps cluster: + + ```shell + kubectl create secret generic mission-control-kubeconfig \ + -n flux-system \ + --from-file=KUBECONFIG=./kubeconfig + ``` + + +1. Reference the kubconfig when deploying Mission Control manifests: + + ```yaml + apiVersion: kustomize.toolkit.fluxcd.io/v1 + kind: Kustomization + metadata: + name: mission-control-config + namespace: flux-system + spec: + interval: 10m + path: ./ + prune: true + sourceRef: + kind: GitRepository + name: mission-control-gitops + kubeConfig: + secretRef: + name: mission-control-kubeconfig + key: KUBECONFIG + ``` + + + + diff --git a/mission-control/sidebars.js b/mission-control/sidebars.js index d4f653df..258e5327 100644 --- a/mission-control/sidebars.js +++ b/mission-control/sidebars.js @@ -183,6 +183,12 @@ const sidebars = { label: 'Agent' }, + { + type: 'doc', + id: 'installation/saas/kubectl', + label: 'Kubectl Access' + }, + ] }, {