npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

aws-cdk-k8s

v0.5.5

Published

CDK Infrastructure as Code for Self Hosted Kubernetes on AWS

Downloads

22

Readme

IaC Accelerator - Self Hosted Kubernetes cluster in AWS

Objectives

This is under development with the following objectives

✅ Deploy Enterprise grade Production cluster on Day 1

✅ Highly Scalable

✅ Highly Available

✅ CI/CD Compatibilty

✅ Event driven deployment with minimal maintenance

Milestones

| Version | Expected Month | Release Date | Release Type | Features | Use Cases | | ------- | -------------- | ------------ | ---------------- | ------------------------------------------------------------------- | -------------------- | | v0.5.0 | May 2026 | 30-May | Preview | Single Control Plane with multiple worker nodes | K8S Learning POC | | | | v1.0.0 | Jan 2027 | | Production Grade | Auto Scaling, Multiple Control Plane nodes, Event Driven Deployment | POC Beta |

Prerequisities

In order to use this accelerator, following are needed.

  1. AWS Account with VPC (default or custom)
  2. Log into AWS locally
  3. Node.JS installed in your system
  4. AWS CDk installed npm i -g aws-cdk
  5. CDK Bootstrapped region. Refer to this page on how to bootstrap your account/region
  6. Basic knowledge of CDK and Typescript is recommended

Steps / Commands to Deploy Cluster

  1. Create a folder locally mkdir my-project
  2. cd my-project
  3. cdk init --language typescript
  4. npm i aws-k8s
  5. Open file ./bin/my-project.ts
  6. Replace the pre-populated code with the following code
import { App, StackProps } from "aws-cdk-lib";
import { K8sStack } from "../lib/k8s-stack";
import { K8sClusterProps } from "../lib/types";
import { InstanceSize,SubnetType } from "aws-cdk-lib/aws-ec2";

const app = new App();
const clusterProps: K8sClusterProps = {
  vpcId: "vpc-11111111111111111", // replace with your vpc id
  amiParamName: "/ami/amazon-linux",// See section 'Important Considerations'
  associatePublicIpAddress: true,// See section 'Important Considerations'

  // All the following attributes are optional
  subnetType: SubnetType.PUBLIC,// See section 'Important Considerations'
  keyPairName: "ec2-instances",
  Considerations'
  clusterName: "k8s",
  namePrefix: "learning",
  envTag: "dev",
  controlPlaneInstance: {
    size: InstanceSize.MEDIUM,
    ingressRules: [
      {
        port: {
          lowerRange: 6443,
          upperRange: 6443,
        },
        peerType: "AnyIpv4",
      },
    ],
  },
};

const stackProps: StackProps = {
  stackName: "k8s-stack",
  env: {
    account: process.env.CDK_DEFAULT_ACCOUNT,
    region: "<my-region>",
  },
  tags: {
    dept: "platform",
    "cost-centre": "12345",
  },
};

new K8sStack(app, "k8s-stack", clusterProps, stackProps);

  1. Log into AWS locally
  2. Set AWS profile with the following commands. Powershell: $env:AWS_PROFILE='my-profile'; Bash: export AWS_PROFILE=my-profile
  3. Run command cdk deploy
  4. Wait for the deployment to finish
  5. Once deployment done, note down Control Plane instance ID from the output
  6. Wait for 5-10 minutes after deployment is finished as the current version is not CI/CD compatible. This will allow EC2 instances to complete predefined userdata that installs Kubernetes and join the worker nodes to cluster
  7. Log into Control Plane node by running the following command aws ssm start-session --target $args[0] --region <my-region> --document-name AWS-StartInteractiveCommand --parameters command="/bin/bash" Replace <my-region> with actual AWS Region
  8. Above command will log you into Cluster instance
  9. Run this command sudo -i
  10. Run this command kubectl get nodes to see the nodes running. You should see an output like the following: Output Snapshot

Important Considerations

  1. Attribute amiParamName:

    1. You should supply your own AMI ID that will be used for EC2 instance. AMI shoule be based on Red Hat based distribution. This is tested with Amazon Linux AMI. Hence, I recommend to use the same.
    2. Create a parameter in AWS with data type as aws:ec2:image and provide the ami id as the value. ex:ami-050b6e407a84b6284
    3. I have used Amazon Linux image ami-050b6e407a84b6284 from region ap-south-2 for testing of this library. You may use a value depending on your region
  2. Attribute associatePublicIpAddress: You may set it to true only for education / training purpose. Otherwise, it is highly recommnded to set it to false. When this is false, ensure the following for proper connectivity

    1. Create following 3 VPC Endpoints
      1. SSM com.amazonaws.<region>.ssm
      2. EC2 Messages com.amazonaws.<region>.ec2messages
      3. SSM Messages com.amazonaws.<region>.ssmmessages
    2. Security group attached to VPC shoud have inbound rule to allow port 443 with source CIDR same as VPC CIDR. ex: 10.0.0.0/16. This will allow Session Manager to register with EC2 SSM agent and you will be able to connect to EC2
  3. Attribute subnetType : This is an optional attribute and defaults to Public. You may select other values, but ensure EC2 has necessary internet connection to install all required dependencies

  4. Help document for other attributes: As this is a typescript project, there is a help documentation embedded for each attribute. Feel free to hover the mouse on an attribute, which will pop up the documentation. You should use IDE tool that supports intellisense ex: VS Code