proud-spoon-58287
11/09/2020, 11:18 AMconst awsProvider = new aws.Provider("<http://stage.property.xyz|stage.property.xyz>",{
region: "eu-west-2",
maxRetries: 1,
profile: "<http://stage.property.xyz|stage.property.xyz>"
})
// Create an EKS cluster with the default configuration.
const cluster = new eks.Cluster("my-cluster",{
});
// Export the cluster's kubeconfig.
export const kubeconfig = cluster.kubeconfig;
const awsProvider = new aws.Provider("aws-stage", {
region: "eu-west-2",
maxRetries: 1,
profile: "<http://stage.property.xyz|stage.property.xyz>"
})
// Create an EKS cluster with non-default configuration
const vpc = new awsx.ec2.Vpc("vpc", {subnets: [{type: "public"}]});
const cluster = new eks.Cluster(name, {
vpcId: vpc.id,
subnetIds: vpc.publicSubnetIds,
desiredCapacity: 2,
minSize: 1,
maxSize: 2,
storageClasses: "gp2",
deployDashboard: false,
providerCredentialOpts: {
profileName: "<http://stage.property.xyz|stage.property.xyz>"
}
},
{
provider: awsProvider
});
error: Running program '/Users/sdicola/IdeaProjects/property-xyz/eks-pulumi' failed with an unhandled exception:
Error: invocation of aws:index/getAvailabilityZones:getAvailabilityZones returned an error: 1 error occurred:
* missing required configuration key "aws:region": The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc.
Set a value using the command `pulumi config set aws:region <value>`.
sticky-translator-17495
11/09/2020, 1:51 PMawsProvider
to the awsx.ec2.Vpc
resource. That would make pulumi fallback on default provider configuration in your config file (I think), where you might be lacking the region?proud-spoon-58287
11/09/2020, 2:53 PMsticky-translator-17495
11/09/2020, 3:15 PMproud-spoon-58287
11/09/2020, 3:43 PMconst strimziNameSpace = new k8s.core.v1.Namespace("strimzi", undefined, {provider: strimziKafkaCluster.provider});
const strimziClusterOperator = new helm.v2.Chart("strimzi-kafka-operator", {
fetchOpts: {
repo: "<https://strimzi.io/charts/>"
},
chart: "strimzi-kafka-operator",
version: "0.20.0",
namespace: strimziNameSpace.metadata.name
},
{
provider: strimziKafkaCluster.provider,
}
);
sticky-translator-17495
11/10/2020, 12:24 PMdependsOn: [strimziNameSpace]
on the helm chart?proud-spoon-58287
11/10/2020, 12:25 PMerror: update failed
kubernetes:<http://rbac.authorization.k8s.io/v1:RoleBinding|rbac.authorization.k8s.io/v1:RoleBinding> (strimzi-u4ii175e/strimzi-cluster-operator-topic-operator-delegation):
error: resource strimzi-u4ii175e/strimzi-cluster-operator-topic-operator-delegation was not successfully created by the Kubernetes API server : namespaces "strimzi-u4ii175e" not found
{
provider: awsProvider,
dependsOn: strimziNameSpace
}
const awsProvider = new aws.Provider("aws-stage-provider", {
region: "eu-west-2",
profile: "<http://stage.property.xyz|stage.property.xyz>",
maxRetries: 1
});
const kafkaVPC = new awsx.ec2.Vpc("strimzi-kafka-vpc", {
subnets: [{type: "public"}]
},
{
provider: awsProvider
}
);
const strimziKafkaCluster = new eks.Cluster("strimzi-kafka", {
vpcId: kafkaVPC.id,
subnetIds: kafkaVPC.publicSubnetIds,
storageClasses: "gp2",
version: "1.18",
deployDashboard: false,
providerCredentialOpts: {
profileName: "<http://stage.property.xyz|stage.property.xyz>"
},
nodeGroupOptions: {
instanceType: "t3.micro",
spotPrice: "0.9",
desiredCapacity: 3,
minSize: 1,
maxSize: 3
}
},
{
provider: awsProvider,
}
);
const strimziNameSpace = new k8s.core.v1.Namespace("strimzi", undefined, {provider: strimziKafkaCluster.provider});
const strimziClusterOperator = new helm.v2.Chart("strimzi-kafka-operator", {
fetchOpts: {
repo: "<https://strimzi.io/charts/>"
},
chart: "strimzi-kafka-operator",
version: "0.20.0",
namespace: strimziNameSpace.metadata.name
},
{
provider: strimziKafkaCluster.provider,
dependsOn: strimziNameSpace
}
);
export const kubeconfig = strimziKafkaCluster.kubeconfig;
kubernetes:<http://rbac.authorization.k8s.io/v1:RoleBinding|rbac.authorization.k8s.io/v1:RoleBinding> (strimzi-u4ii175e/strimzi-cluster-operator-entity-operator-delegation):
error: resource strimzi-u4ii175e/strimzi-cluster-operator-entity-operator-delegation was not successfully created by the Kubernetes API server : namespaces "strimzi-u4ii175e" not found
sticky-translator-17495
11/10/2020, 12:31 PMawsProvider
should be set on all resources?proud-spoon-58287
11/10/2020, 1:01 PM+ kubernetes:apps/v1:Deployment strimzi-u4ii175e/strimzi-cluster-operator creating Retry #5; creation failed: namespaces "strimzi-u4ii175e" not found
strimzi-80rac5e7 Active 32s
❯ k get pods
NAME READY STATUS RESTARTS AGE
strimzi-cluster-operator-7bb9fd9f7b-86w8m 1/1 Running 0 56s