Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/videmsky/pulumi-aws-ts-k8s-go
a simple golang/gin app deployed to Kubernetes on AWS EKS.
https://github.com/videmsky/pulumi-aws-ts-k8s-go
aws eks gin golang kubernetes pulumi
Last synced: 16 days ago
JSON representation
a simple golang/gin app deployed to Kubernetes on AWS EKS.
- Host: GitHub
- URL: https://github.com/videmsky/pulumi-aws-ts-k8s-go
- Owner: videmsky
- Created: 2024-02-27T06:08:10.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-28T19:47:07.000Z (11 months ago)
- Last Synced: 2024-02-29T17:57:04.223Z (11 months ago)
- Topics: aws, eks, gin, golang, kubernetes, pulumi
- Language: TypeScript
- Homepage:
- Size: 5.41 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pulumi-aws-ts-k8s-go
A simple golang/gin app deployed to Kubernetes on AWS EKS.
Pulumi does the following:
- Builds the Docker images
- Provisions AWS Container Registry (ECR) instance
- Pushes the images to the ECR instance
- Provisions AWS EKS cluster
- Uses the images to create Kubernetes deployments## Prerequisites
1. Install NPM modules:
```bash
$ npm install
```## Deploying and running the program
1. Create a new stack:
```bash
$ pulumi stack init prod
```2. Set the AWS region and environment variables:
```bash
$ pulumi config set aws:region us-west-2
$ pulumi config set hello-go:hello_message "Hello, Pulumi"
```3. Run `pulumi up -y` to deploy changes:
4. Verify that the EKS instance exists by connecting to it on port `:8889` in a browser window.
## Clean up
To clean up resources, run `pulumi destroy -s prod`
## Misc. Commands
Grab URNs to target orphaned resources
* `pulumi stack --show-urns`
* `pulumi destroy --target urn:pulumi:pulumi-aws-ts-k8s-go::hello-go::eks:index:Cluster::eksCluster -y --target-dependents`Interact with EKS cluster
* `pulumi stack output kubeConfig --show-secrets > kubeconfig`
* `export KUBECONFIG=$PWD/kubeconfig`Stack commands
* `pulumi stack ls`
* `pulumi stack select prod`
* `pulumi up -s prod`
* `pulumi stack rm prod`