Skip to content

Commit

Permalink
chore: add kubectl access
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Oct 29, 2024
1 parent b0e729e commit d30d345
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
51 changes: 51 additions & 0 deletions mission-control/docs/installation/saas/kubectl.md
Original file line number Diff line number Diff line change
@@ -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.

<Screenshot img="/img/download-kubeconfig.png" size="400px"/>

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
```




6 changes: 6 additions & 0 deletions mission-control/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ const sidebars = {
label: 'Agent'
},

{
type: 'doc',
id: 'installation/saas/kubectl',
label: 'Kubectl Access'
},

]
},
{
Expand Down

0 comments on commit d30d345

Please sign in to comment.