sparse-intern-71089
04/23/2023, 9:28 PMbillowy-army-68599
eksCluster.provider
?salmon-musician-36333
04/23/2023, 9:50 PMconst eksCluster = new eks.Cluster(eksClusterName, {
// ...
});
salmon-musician-36333
04/23/2023, 9:51 PM@pulumi/eks
billowy-army-68599
salmon-musician-36333
04/23/2023, 9:53 PMsalmon-musician-36333
04/23/2023, 9:53 PMsalmon-musician-36333
04/23/2023, 9:57 PMsalmon-musician-36333
04/23/2023, 9:59 PMconst eksClusterProvider = new k8s.Provider(`${deployTag}-cluster-provider`, {
kubeconfig: eksCluster.kubeconfig.apply((k) => k.json),
});
billowy-army-68599
billowy-army-68599
salmon-musician-36333
04/23/2023, 9:59 PM{
providers: { kubernetes: eksClusterProvider },
},
salmon-musician-36333
04/23/2023, 10:00 PMJSON.stringify(eksCluster.kubeconfig)
then?salmon-musician-36333
04/23/2023, 10:01 PMbillowy-army-68599
eksCluster.kubeconfig
salmon-musician-36333
04/23/2023, 10:03 PMsalmon-musician-36333
04/23/2023, 10:03 PMconst eksClusterProvider = new k8s.Provider(`${deployTag}-cluster-provider`, {
kubeconfig: eksCluster.kubeconfig,
});
billowy-army-68599
salmon-musician-36333
04/23/2023, 10:04 PMconst eksClusterName = `${deployTag}-cluster`;
const eksCluster = new eks.Cluster(eksClusterName, {
// Put the custer in the new VPC created earlier
vpcId: eksVpc.vpcId,
// Public subnets will be used for load balancers
publicSubnetIds: eksVpc.publicSubnetIds,
// Private subnets will be used for cluster nodes
privateSubnetIds: eksVpc.privateSubnetIds,
// Change configuration values to change any of the following settings
instanceType: eksNodeInstanceType,
desiredCapacity: desiredClusterSize,
minSize: minClusterSize,
maxSize: maxClusterSize,
// Do not give the worker nodes public IP addresses
nodeAssociatePublicIpAddress: false,
// Uncomment the next two lines for a private cluster (VPN access required)
// endpointPrivateAccess: true,
// endpointPublicAccess: false
});
const eksClusterProvider = new k8s.Provider(`${deployTag}-cluster-provider`, {
kubeconfig: eksCluster.kubeconfig,
});
// Exports
export const kubeconfig = eksCluster.kubeconfig;
// Deploy the AWS EFS CSI driver chart
const awsEfsCsiDriver = new k8s.helm.v3.Chart(
'aws-efs-csi-driver',
{
namespace: 'kube-system',
chart: 'aws-efs-csi-driver',
fetchOpts: {
repo: '<https://kubernetes-sigs.github.io/aws-efs-csi-driver/>',
},
},
{
providers: { kubernetes: eksClusterProvider },
//dependsOn: eksCluster,
},
);
billowy-army-68599
import * as aws from '@pulumi/aws';
import * as eks from '@pulumi/eks';
import * as k8s from '@pulumi/kubernetes';
import * as awsx from '@pulumi/awsx';
const vpc = new awsx.ec2.Vpc('vpc', {})
const eksCluster = new eks.Cluster("foo", {
// Put the custer in the new VPC created earlier
vpcId: vpc.vpcId,
// Public subnets will be used for load balancers
publicSubnetIds: vpc.publicSubnetIds,
// Private subnets will be used for cluster nodes
privateSubnetIds: vpc.privateSubnetIds,
// Change configuration values to change any of the following settings
instanceType: "t3.medium",
desiredCapacity: 1,
minSize: 1,
maxSize: 1,
// Do not give the worker nodes public IP addresses
nodeAssociatePublicIpAddress: false,
// Uncomment the next two lines for a private cluster (VPN access required)
// endpointPrivateAccess: true,
// endpointPublicAccess: false
});
const eksClusterProvider = new k8s.Provider(`cluster-provider`, {
kubeconfig: eksCluster.kubeconfig,
});
// Exports
export const kubeconfig = eksCluster.kubeconfig;
// Deploy the AWS EFS CSI driver chart
const awsEfsCsiDriver = new k8s.helm.v3.Chart(
'aws-efs-csi-driver',
{
namespace: 'kube-system',
chart: 'aws-efs-csi-driver',
fetchOpts: {
repo: '<https://kubernetes-sigs.github.io/aws-efs-csi-driver/>',
},
}, { provider: eksClusterProvider },
);
billowy-army-68599
k8s.helm.v3.Release
for that chart because it contains helm hookssalmon-musician-36333
04/23/2023, 10:55 PM