late-printer-99022
01/11/2020, 6:55 PMlate-printer-99022
01/11/2020, 7:33 PM'type: 'LoadBalancer'
I got the url using ELB automatically. those urls are very long url. I want to connect using Route53.
so, I want to have this kind of urls. https://api.mydomain.com/service1 , https://api.mydomain.com/service2 ,
after looking some example, I changed type. it is now type: NodePort
. I may need to create k8s.networking.v1beta1.Ingress
and use aws-alb-ingress-controller
and route traffic. I tried and didn't worked because example was not having Route53 specific code. I don't know if it do automatically internally.
all micro-services are working fine. deployed successfully. only the routing part is now remaining. So, please help me.
1. All services need NodePort
or LoadBalancer
2. What is good url scheme ? https://api_service1.mydomain.com or https://api.mydomain.com/service1 ?
Kindly help and suggest.
+ Also, people suggest me to add API Gateway. where API Gateway comes into this picture?fast-dinner-32080
01/11/2020, 9:25 PMflat-insurance-25294
01/12/2020, 12:10 AMminiature-grass-95081
01/12/2020, 1:24 AMflat-insurance-25294
01/12/2020, 2:36 AMBucketPublicAccessBlockArgs
I tested first using the name and then the arn but it expected the id.flat-insurance-25294
01/12/2020, 2:36 AMflat-insurance-25294
01/12/2020, 3:46 AMflat-insurance-25294
01/12/2020, 3:48 AM- aws:cloudfront:Distribution s3Distribution deleting
always failsorange-ghost-99337
01/12/2020, 11:17 AMbright-orange-69401
01/12/2020, 7:34 PMelegant-dress-88912
01/13/2020, 7:01 AMconst redis = new k8s.helm.v2.Chart(
...
transformations: [
addNamespace(redisNamespace.metadata.name),
args => {
if (args.props.metadata && args.props.metadata.name) {
return {
props: args.props,
opts: pulumi.mergeOptions(args.opts, {
import: args.props.metadata.name
})
};
}
return undefined;
}
]
}
);
However, this fails with
$ pulumi up
+ ├─ kubernetes:helm.sh:Chart redis create
= │ ├─ kubernetes:core:Service redis-headless import 1 error
= │ ├─ kubernetes:core:ConfigMap redis import [diff: +data~metadata]; 1 warning
= │ ├─ kubernetes:core:ConfigMap redis-health import 1 error
= │ ├─ kubernetes:core:Service redis-master import 1 error
= │ ├─ kubernetes:core:Secret redis import 1 error
= │ └─ kubernetes:apps:StatefulSet redis-master import 1 error
= └─ kubernetes:core:Namespace redis import
Diagnostics:
kubernetes:core:Service (redis-master):
error: Preview failed: resource 'redis-master' does not exist
kubernetes:core:Service (redis-headless):
error: Preview failed: resource 'redis-headless' does not exist
kubernetes:core:ConfigMap (redis):
warning: inputs to import do not match the existing resource; importing this resource will fail
...
Errors stating that resource does not exist are wrong - resources are here. The thing is that pulumi checks resources under default
namespace - I verified it by creating cm default/redis
and it shows different error for the resource.
Another concern is "warning: inputs to import do not match the existing resource; importing this resource will fail" - how do I force pulumi to take over this resource?
For now I have to deploy chart into a different namespace, export stack state into a file, edit it by replacing namespace name, destroy resources, and reimport modified state. I.e. I can't just use this import feature of pulumi.late-printer-99022
01/13/2020, 9:32 AM--cluster-name=${synPlatformCluster.eksCluster.name}`
this is also not working.
--cluster-name=${synPlatformCluster.eksCluster.name.apply((v) => `${v}`)}`
getting following notice.
containers : [
[0]: {
args : [
[0]: "--ingress-class=alb"
[1]: "--cluster-name=Calling [toString] on an [Output<T>] is not supported.\n\nTo get the value of an Output<T> as an Output<string> consider either:\n1: o.apply(v => `prefix${v}suffix`)\n2: pulumi.interpolate `prefix${v}suffix`\n\nSee <https://pulumi.io/help/outputs> for more details.\nThis function may throw in a future version of @pulumi/pulumi."
]
image : "<http://894847497797.dkr.ecr.us-west-2.amazonaws.com/aws-alb-ingress-controller:v1.0.0|894847497797.dkr.ecr.us-west-2.amazonaws.com/aws-alb-ingress-controller:v1.0.0>"
imagePullPolicy : "Always"
name : "server"
terminationMessagePath: "/dev/termination-log"
}
]
dnsPolicy : "ClusterFirst"
restartPolicy : "Always"
serviceAccount : "alb-ingress"
serviceAccountName : "alb-ingress"
terminationGracePeriodSeconds: 30
}
}
late-printer-99022
01/13/2020, 11:31 AMlate-printer-99022
01/13/2020, 12:33 PMlate-printer-99022
01/13/2020, 12:35 PMbillowy-secretary-44583
01/13/2020, 2:23 PM"use strict";
const pulumi = require("@pulumi/pulumi");
const digitalocean = require("@pulumi/digitalocean");
const kubernetes = require("@pulumi/kubernetes");
const region = "sfo2";
const kubernetesVersion = "1.16.2-do.2";
const nodeSize = "s-1vcpu-2gb";
const nodeCount = 1;
const cluster = new digitalocean.KubernetesCluster(
"kubernetes-cluster",
{
region: region,
version: kubernetesVersion,
nodePool: {name: "default", size: nodeSize, nodeCount: nodeCount}
}
);
const kubeconfig = cluster.kubeConfigs[0].rawConfig;
const provider = new kubernetes.Provider("kubernetes-provider", {cluster, kubeconfig});
const chart = new kubernetes.helm.v2.Chart(
"nginx-ingress-chart",
{
repo: "stable",
chart: "nginx-ingress",
version: "1.28.3"
},
{providers: {kubernetes: provider}});
const controllerStatus = chart.getResourceProperty(
"v1/Service",
"nginx-ingress-chart-nginx-ingress-controller",
"status");
const ipAddress = controllerStatus.apply(status => status.loadBalancer.ingress[0].ip);
module.exports = {ipAddress};
I get TypeError: Cannot read property 'status' of undefined
.
I think it might have something to do with pulumi trying to install the chart before the cluster/provider is created (?). The resource tree shows the chart but not its "contents":
Type Name Plan Info
+ pulumi:pulumi:Stack test-do-k8s-do-k8s create 1 error
+ ├─ kubernetes:helm.sh:Chart nginx-ingress-chart create
+ ├─ digitalocean:index:KubernetesCluster kubernetes-cluster create
+ └─ pulumi:providers:kubernetes kubernetes-provider create
damp-pillow-67781
01/13/2020, 6:13 PMno resource plugin 'pulumi-nodejs' found in the workspace or on your $PATH
on my new linux worker, I thought I saw the error before but not sure I fixed it. Any ideas?fast-dinner-32080
01/13/2020, 8:42 PMshy-microphone-28807
01/13/2020, 9:39 PMshy-microphone-28807
01/13/2020, 9:39 PMid
on undefinedshy-microphone-28807
01/13/2020, 9:40 PMconst sourceIds = sourceAccounts.apply(accounts => accounts.map(account => `${account.id}`))
busy-umbrella-36067
01/13/2020, 9:58 PMawsx.ecs.FargateService
attempt to find an ECS cluster if one is not defined?
Or does it always create a cluster name default-cluster
?rhythmic-camera-25993
01/13/2020, 10:01 PMcluster
parameter of the FargateServiceArgsorange-ghost-99337
01/13/2020, 10:41 PMorange-ghost-99337
01/13/2020, 10:42 PMpulumi config set --secret --path sat-key.yellow "$(cat sat_key.pub)
An error occurred: bad flag syntax: -----BEGIN PUBLIC KEY----
bright-orange-69401
01/14/2020, 5:09 AMraw_input
function to read from CLI)cold-coat-35200
01/14/2020, 7:29 AMpulumi plugin rm --all
command, then a pulumi up in a repo, expected pulumi to install the necessary plugin, but get:
➜ cert-manager (cert-manager) ✗ pulumi up
Previewing update (sbx):
[resource plugin aws-1.17.0] installing
Downloading plugin: 58.95 MiB / 58.95 MiB [========================] 100.00% 11s
Moving plugin... done.
error: could not load plugin for kubernetes provider 'urn:pulumi:sbx::k8s-cert-manager::pulumi:providers:kubernetes::k8s-provider': no resource plugin 'kubernetes' found in the workspace or on your $PATH
looks really strange, that it installed one plugin, but not the others.
I assume there is a better way than manually install the correct plugin versionsadventurous-garage-59192
01/14/2020, 7:47 AMadorable-sugar-92867
01/14/2020, 9:29 AMnew ConfigFile(name, {file: https://...})
), but unfortunatly that does not seem to be idempotent… Is there a better ‘Pulumi’ way to create the needed k8s resources inside
<https://github.com/jetstack/cert-manager/releases/download/v0.12.0/cert-manager.yaml>
?