Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@pulumi/kubernetes
Advanced tools
A Pulumi package for creating and managing Kubernetes resources.
@pulumi/kubernetes is an npm package that allows you to manage Kubernetes resources using Pulumi, a modern infrastructure as code platform. With this package, you can define, deploy, and manage Kubernetes applications and infrastructure using familiar programming languages like JavaScript, TypeScript, and Python.
Creating Kubernetes Resources
This feature allows you to create Kubernetes resources such as Deployments, Services, and ConfigMaps. The code sample demonstrates how to create a simple Nginx deployment with two replicas.
const pulumi = require('@pulumi/pulumi');
const k8s = require('@pulumi/kubernetes');
const appLabels = { app: 'nginx' };
const deployment = new k8s.apps.v1.Deployment('nginx-deployment', {
spec: {
selector: { matchLabels: appLabels },
replicas: 2,
template: {
metadata: { labels: appLabels },
spec: { containers: [{ name: 'nginx', image: 'nginx' }] }
}
}
});
exports.deploymentName = deployment.metadata.name;
Managing Kubernetes Configurations
This feature allows you to manage Kubernetes configurations such as ConfigMaps and Secrets. The code sample demonstrates how to create a ConfigMap with a key-value pair.
const pulumi = require('@pulumi/pulumi');
const k8s = require('@pulumi/kubernetes');
const configMap = new k8s.core.v1.ConfigMap('my-config', {
metadata: { name: 'my-config' },
data: { 'key': 'value' }
});
exports.configMapName = configMap.metadata.name;
Deploying Helm Charts
This feature allows you to deploy applications using Helm charts. The code sample demonstrates how to deploy an Nginx Helm chart from the Bitnami repository.
const pulumi = require('@pulumi/pulumi');
const k8s = require('@pulumi/kubernetes');
const nginx = new k8s.helm.v3.Chart('nginx', {
chart: 'nginx',
version: '1.0.0',
fetchOpts: { repo: 'https://charts.bitnami.com/bitnami' }
});
exports.nginxServiceName = nginx.getResource('v1/Service', 'nginx').metadata.name;
The 'kubernetes' npm package is a client library for interacting with the Kubernetes API. It allows you to manage Kubernetes resources programmatically. Unlike @pulumi/kubernetes, it does not provide infrastructure as code capabilities and is more focused on direct API interactions.
The 'kubernetes-client' npm package is another client library for the Kubernetes API. It provides a higher-level abstraction compared to the 'kubernetes' package and includes features like easy resource creation and management. However, it lacks the infrastructure as code features provided by @pulumi/kubernetes.
The 'k8s' npm package is a lightweight client for the Kubernetes API. It is designed for simplicity and ease of use, making it suitable for small scripts and automation tasks. It does not offer the comprehensive infrastructure as code capabilities of @pulumi/kubernetes.
FAQs
[![Build Status](https://travis-ci.com/pulumi/pulumi-kubernetes.svg?token=eHg7Zp5zdDDJfTjY8ejq&branch=master)](https://travis-ci.com/pulumi/pulumi-kubernetes) [![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) [![NPM
The npm package @pulumi/kubernetes receives a total of 423,106 weekly downloads. As such, @pulumi/kubernetes popularity was classified as popular.
We found that @pulumi/kubernetes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.