Skip to content

Instantly share code, notes, and snippets.

View djstein's full-sized avatar
😬
building https://logic.design

Dylan Stein djstein

😬
building https://logic.design
View GitHub Profile
@alongubkin
alongubkin / TraefikRoute.ts
Last active June 30, 2022 23:12
Create Traefik IngressRoute with strip prefix & add trailing slash using Pulumi
import * as pulumi from '@pulumi/pulumi';
import * as k8s from '@pulumi/kubernetes';
export interface TraefikRouteArgs {
namespace: pulumi.Input<string>;
prefix: pulumi.Input<string>;
service: pulumi.Input<k8s.core.v1.Service>;
}
export default class TraefikRoute extends pulumi.ComponentResource {

I have been an aggressive Kubernetes evangelist over the last few years. It has been the hammer with which I have approached almost all my deployments, and the one tool I have mentioned (shoved down clients throats) in almost all my foremost communications with clients, and it was my go to choice when I was mocking my first startup (saharacluster.com).

A few weeks ago Docker 1.13 was released and I was tasked with replicating a client's Kubernetes deployment on Swarm, more specifically testing running compose on Swarm.

And it was a dream!

All our apps were already dockerised and all I had to do was make a few modificatons to an existing compose file that I had used for testing before prior said deployment on Kubernetes.

And, with the ease with which I was able to expose our endpoints, manage volumes, handle networking, deploy and tear down the setup. I in all honesty see no reason to not use Swarm. No mission-critical feature, or incredibly convenient really nice to have feature in Kubernetes that I'm go

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.