How to use the @pulumi/kubernetes.storage function in @pulumi/kubernetes

To help you get started, we’ve selected a few @pulumi/kubernetes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pulumi / kubernetes-guides / gcp / 03-cluster-configuration / index.ts View on Github external
metadata: { namespace: appsNamespaceName },
            subjects: [{
                kind: "User",
                name: `${devsAccountId}@${project}.iam.gserviceaccount.com`,
            }],
            roleRef: {
                apiGroup: "rbac.authorization.k8s.io",
                kind: "Role",
                name: devsGroupRole.metadata.name,
            },
        }, { provider }
    )
})

// Create the standard StorageClass.
const sc = new k8s.storage.v1.StorageClass("standard",
    {
        provisioner: "kubernetes.io/gce-pd",
        parameters: {
            "type": "pd-standard",
            "replication-type": "none"
        },
    },
    { provider: provider }
);

// Create a Persistent Volume Claim on the StorageClass.
const myPvc = new k8s.core.v1.PersistentVolumeClaim("mypvc", {
        spec: {
            accessModes: ["ReadWriteOnce"],
            storageClassName: sc.metadata.name,
            resources: {requests: {storage: "1Gi"}}
github pulumi / kubernetes-guides / azure / 03-cluster-configuration / index.ts View on Github external
{
            metadata: { namespace: roleNs },
            subjects: [{
                kind: "Group",
                name: config.adGroupDevs,
            }],
            roleRef: {
                apiGroup: "rbac.authorization.k8s.io",
                kind: "Role",
                name: devsGroupRole.metadata.name,
            },
        }, { provider });
});

// Create the premium StorageClass.
const sc = new k8s.storage.v1.StorageClass("premium",
    {
        provisioner: "kubernetes.io/azure-disk",
        parameters: {
            "storageaccounttype": "Premium_LRS",
            "kind": "Managed"
        },
}, { provider: provider });

// Create a Persistent Volume Claim on the StorageClass.
const myPvc = new k8s.core.v1.PersistentVolumeClaim("mypvc", {
    spec: {
        accessModes: ["ReadWriteOnce"],
        storageClassName: sc.metadata.name,
        resources: {requests: {storage: "1Gi"}}
    }
}, { provider: provider });
github pulumi / pulumi-eks / nodejs / eks / storageclass.ts View on Github external
"type": storageClass.type,
    };
    if (storageClass.zones) {
        parameters["zones"] = pulumi.output(storageClass.zones).apply(v => v.join(", "));
    }
    if (storageClass.iopsPerGb) {
        parameters["iopsPerGb"] = pulumi.output(storageClass.iopsPerGb).apply(v => `${v}`);
    }
    if (storageClass.encrypted) {
        parameters["encrypted"] = pulumi.output(storageClass.encrypted).apply(v => `${v}`);
    }
    if (storageClass.kmsKeyId) {
        parameters["kmsKeyId"] = storageClass.kmsKeyId;
    }

    return new k8s.storage.v1.StorageClass(name, {
        metadata: metadata,
        provisioner: "kubernetes.io/aws-ebs",
        parameters: parameters,
        allowVolumeExpansion: storageClass.allowVolumeExpansion,
        mountOptions: storageClass.mountOptions,
        reclaimPolicy: storageClass.reclaimPolicy,
        volumeBindingMode: storageClass.volumeBindingMode,
    }, opts);
}

@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

Apache-2.0
Latest version published 11 days ago

Package Health Score

92 / 100
Full package analysis