Skip to content

Commit

Permalink
Add docs for how to configure kubectl (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekerfelt authored Jan 25, 2024
1 parent c29d3e5 commit a5c9c8c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
22 changes: 22 additions & 0 deletions docs/deploy/configure-kubectl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
seotitle: Configure kubectl to access your Encore Kubernetes cluster
seodesc: Learn how to configure kubectl to access your Encore Kubernetes cluster.
title: Configure kubectl
---

Encore automatically provisions and manages Kubernetes clusters for you, but sometimes it's useful to manually inspect
clusters using the [kubectl](https://kubernetes.io/docs/reference/kubectl/) cli. To do this, you need to configure `kubectl` to connect and authenticate through
encore. You can do this by running the following command in your app directory:

```shell
encore kubernetes configure -e <environment>
```

Where `<environment>` is the name of the environment you want to configure `kubectl` for.

This will configure `kubectl` to use `encore` to authenticate the cluster and proxy your traffic to the correct
cluster. You can now use `kubectl` as you normally would, for example:

```shell
kubectl get pods
```
4 changes: 3 additions & 1 deletion docs/deploy/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
seotitle: How to deploy your Encore application to a new Kubernetes cluster
seodesc: Learn how to automatically deploy your Encore application to a new Kubernetes cluster.
title: Kubernetes deployment
subtitle: Deploying to your app to a new Kubernetes cluster
subtitle: Deploying your app to a new Kubernetes cluster
---

When you build your app using Encore's [Infrastructure SDK](/docs/primitives), you can deploy the same code to many different types of [cloud infrastructure](/docs/deploy/infra). Encore will automatically handle provisioning different infrastructure for each environment — depending on your goals. Configuring what type of compute platform you want is done through the [Cloud Dashboard](https://app.encore.dev) rather than in the application code.
Expand All @@ -24,3 +24,5 @@ You can also configure if you want to allocate all services in one process or ru
**3. Push your code:** To deploy, commit and push your code to the branch you configured as the deployment trigger. You can also trigger a manual deploy from the Cloud Dashboard by going to the **Environment Overview** page and clicking on **Deploy**.

**4. Automatic deployment by Encore:** Once you've triggered the deploy, Encore will automatically provision and deploy the necessary infrastructure on Kubernetes, per your environment configuration in the Cloud Dashboard. You can monitor the status of your deploy and view your environment's details through the Encore Cloud Dashboard.

**5. Accessing your cluster with kubectl:** You can access your cluster using the `kubectl` CLI tool. [See the docs](/docs/deploy/configure-kubectl) for how to do this.
6 changes: 6 additions & 0 deletions docs/menu.cue
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,12 @@
text: "Kubernetes deployment"
path: "/deploy/kubernetes"
file: "deploy/kubernetes"
inline_menu: [{
kind: "basic"
text: "Configure kubectl"
path: "/deploy/kubernetes/kubectl"
file: "deploy/configure-kubectl"
}]
}, {
kind: "basic"
text: "Import your Kubernetes cluster"
Expand Down

0 comments on commit a5c9c8c

Please sign in to comment.