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 🙏

© 2024 – Pkg Stats / Ryan Hefner

kubernodes

v1.6.0

Published

Google Cloud expansion with focus on kubectl

Downloads

35

Readme

#KuberNodes

A convenience wrapper for kubectl, gcloud, gsutil and bq command line utils

!! Requires Docker !!

##Getting Started Guide

Step 1: Install kubernodes

npm install -g kubernodes

Step 2: Create a Google Cloud Service Account

  1. Browse to Gcloud IAM
  2. Click the "Create Service Account" Button
  3. Fill out the resulting form:
    1. Service Account Name: A label for the account
    2. Service Account ID: Client Email ID
    3. Check the box "Furnish a new private key"
    4. Click the "Create" button
    5. Save the downloaded json file in your working dir: ./.keys/[GCLOUD_PROJECT_ID]_service_key.json

Step 3: Generate your first Dockerfile

Run the following code in your cli

kn-dockerfile -p [GCLOUD_PROJECT_ID] -z [COMPUTE_ZONE] -c [CLUSTER_NAME] > .[KN_PROJECT_NAME]kube.docker

//example
kn-dockerfile -p sites -z us-central1-b -c kubernetes > .siteskube.docker

Note: Repeat this step for each project you want to configure

Step 4: Build all docker files

kn-build [DOCKERHUB_USER/ORGANIZATION]

Optional: Push your files to your repo kn-push [DOCKERHUB_USER/ORGANIZATION]

Step 5: Run some commands

//get all k8s pods
kn [KN_PROJECT_NAME] -r [DOCKERHUB_USER/ORG] -- get pods

//exec into a pod
kn [KN_PROJECT_NAME] -r [DOCKERHUB_USER/ORG] -- exec -it [POD_NAME] bash

//run a query in big query
kn [KN_PROJECT_NAME] -r [DOCKERHUB_USER/ORG] bq -- query 'select count(*) from publicdata:samples.shakespeare'

//enter a big query interactive shell
kn [KN_PROJECT_NAME] -r [DOCKERHUB_USER/ORG] bq -- shell

Step 6: Enjoy easily switching between all of your google projects, with Kubernodes!

##Special Features

Kubernodes Repo Environment: Instead of passing the -r flag with every kn command, you can set the following env var

export KUBERNODES_REPO=[DOCKERHUB_USER/ORGANIZATION]

Kubernodes Watch Mode: For commands that don't require tty or stdin you can use kubernodes watch mode. Watch mode will overtake your terminal and refresh the ouptut of your command every (n) seconds.

Here's how to watch your pods with a 5 second refresh rate

kn [KN_PROJECT_NAME] --watch 5 -- get pods

Kubernodes Proxy: We've made the kubectl proxy command easitly accesible as a positional argument in kubernodes. It currently allows all paths and binds to all ip's by default and is not configurable via this shortcut, but can still be invoked as you normally would any kn command.

Start your proxy

kn [KN_PROJECT_NAME] proxy