
Security News
CISA Extends MITRE Contract as Crisis Accelerates Alternative CVE Coordination Efforts
CISA extended MITRE’s CVE contract by 11 months, avoiding a shutdown but leaving long-term governance and coordination issues unresolved.
k8s-scripts
Advanced tools
Opinionated scripts for managing application development and deployment lifecycle using Kubernetes.
npm install -g k8s-scripts
Then in your top-level project directory:
k8s-example-config
k8s-scripts all function based on a simple bash config file in the root of your project directory named 'k8s-scripts.config'.
# Dockerfile to build
DOCKERFILE='Dockerfile'
# Docker tag that will be created
DOCKERTAG='quay.io/exampleorg/example-app'
# Cluster Namespace to work in
NAMESPACE='default'
# List of files ending in '.configmap.yml' in the kube directory
CONFIGMAPS=()
# List of files ending in '.secret.yml' in the kube directory
SECRETS=('example-app')
# List of files ending in '.service.yml' in the kube directory
SERVICES=('example-app')
# List of files ending in '.deployment.yml' in the kube directory
DEPLOYMENTS=('example-app')
# List of files ending in '.job.yml' in the kube directory (Not supported yet)
JOBS=()
There is a k8s-example-config
script that will output an example config for you.
k8s-example-config
Outputs an example config to k8s-scripts.config
k8s-example-config -o k8s-scripts.prod.config
Outputs an example config to the filename specified by -o flag.
All scripts take an -f configfile
option that allows you to specify which configuration file to use.
We recommend having the default, k8s-scripts.config, setup for your minikube environment, then
specify <env>.conf
for each of your environments.
Your kubernetes API object files should all be stored in the /deploy top level directory using consistent naming:
deployment.yml
secret.yml
configmap.yml
service.yml
job.yml
Does a build of the current directory `docker build --rm=false -t $DOCKERTAG -f ${BASEDIR}/$DOCKERFILE ${BASEDIR}``
Pulls from the registry the most recent build of the image. Useful for CI/CD layer caching
Pushes the recently build image to the registry
Generates $CI_SHA1 suffixs for each of the files defined in your k8s-scripts config and uses
kubectl create
if the objects don't exist, kubectl apply
if they do.
Leverages kubernetes annotations with --record
when creating objects.
Verifies your deployment was successful within a specified timeout.
Nukes everything defined in your k8s-scripts config file.
Switches to the minikube kubectl context, builds a Docker image form your current directory within the minikube Docker environment.
Switches the minikube kubectl context, then runs k8s-deploy
Switches to the minikube kubectl context and deletes all of the objects associated with the k8s-scripts.config
Switches to the minikube kubectl context and prints out the accessible ip:port of any services defined in the config file that are accessible from your local machine
Switches to the minikube kubectl context and prints all the accessible ip:port of all services that are accessible from your local machine
Makes sure kubectl is installed and available for use. Customize the version
by specifying the KUBECTL_VERSION
envrionmental variable. Default: v1.3.6
.
FAQs
Bash scripts for deploying and managing applications in Kubernetes
The npm package k8s-scripts receives a total of 9 weekly downloads. As such, k8s-scripts popularity was classified as not popular.
We found that k8s-scripts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA extended MITRE’s CVE contract by 11 months, avoiding a shutdown but leaving long-term governance and coordination issues unresolved.
Product
Socket's Rubygems ecosystem support is moving from beta to GA, featuring enhanced security scanning to detect supply chain threats beyond traditional CVEs in your Ruby dependencies.
Research
The Socket Research Team investigates a malicious npm package that appears to be an Advcash integration but triggers a reverse shell during payment success, targeting servers handling transactions.