Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pulumi/kubernetes

Package Overview
Dependencies
Maintainers
2
Versions
1363
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pulumi/kubernetes

[![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

  • 4.18.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
477K
increased by9.44%
Maintainers
2
Weekly downloads
 
Created

What is @pulumi/kubernetes?

@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.

What are @pulumi/kubernetes's main functionalities?

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;

Other packages similar to @pulumi/kubernetes

Keywords

FAQs

Package last updated on 13 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc