An open API service indexing awesome lists of open source software.

https://github.com/okteto/external-resources-gcp

Create a Development Environment with Okteto, Kubernetes, and GCP Services
https://github.com/okteto/external-resources-gcp

development-environment development-experience gcp okteto

Last synced: 5 months ago
JSON representation

Create a Development Environment with Okteto, Kubernetes, and GCP Services

Awesome Lists containing this project

README

          

# Create a Development Environment with Okteto, Kubernetes, and GCP Services

This is an example of how to configure and deploy a development environment that includes polyglot microservices, an GCP pub/sub topic and subscription, and an GCP storage bucket.

## Architecture

![Architecture diagram](https://raw.githubusercontent.com/okteto/external-resources-gcp/main/docs/architecture.png)

## Run the demo application in Okteto

### Prerequisites:
1. Okteto CLI 2.14 or newer
1. A GCP account
1. An Okteto account ([Sign-up](https://www.okteto.com/try-free/) for 30 day, self-hosted free trial)
1. [Create a service account key](https://cloud.google.com/iam/docs/keys-create-delete) with create/read/write/delete permissions to pub/sub and storage of IAM keys for your GCP accoun.
1. Add the following [Admin variables](https://www.okteto.com/docs/admin/dashboard/#admin-variables) in your Okteto cluster:

GCP_SERVICE_KEY: The `base64` encoded service account key with permission to create, write, read, and delete cloud resources.
GCP_PROJECT_ID: The project id you would like to use to create the cloud resources

> If you are using Okteto Self-Hosted, you can also use a [Workload Identity](https://www.okteto.com/docs/self-hosted/administration/configuration/#workload-identity)

Once this is configured, anyone with access to your Okteto instance will be able to deploy a development environment, including the required cloud infrastructure, automatically.

```
$ git clone https://github.com/okteto/external-resources-gcp
$ cd external-resources-gcp
$ okteto context use $OKTETO_URL
$ okteto deploy
```

## Develop on the Menu microservice

```
$ okteto up menu
```

## Develop on the Kitchen microservice

```
$ okteto up kitchen
```

## Develop on the Result microservice

```
$ okteto up check
```

## Notes

This isn't an example of a properly architected, perfectly designed distributed app... it's a simple
example of the various types of pieces and languages you might see (queues, persistent data, etc), and how to
deal with them in Okteto.