https://pulumi.com logo
#general
Title
# general
l

lemon-greece-30910

02/25/2019, 11:05 PM
Hi, im wondering if someone can help me. i can see in the documentation when creating a container app, you can specify a path to the
Dockerfile
with
awsx.ecs.Image.fromPath
as show in the example on https://pulumi.io/quickstart/aws/tutorial-service.html ... i would like something similar so i can build an image for kubernetes to work on an example like shown at: https://github.com/pulumi/examples/tree/master/kubernetes-ts-exposed-deployment. i have tried searching the documentation but i am unable to find what i am looking for. perhaps i am searching in the wrong place?
c

creamy-potato-29402

02/25/2019, 11:06 PM
Kubernetesx is not implemented yet.
It’s on the roadmap though.
l

lemon-greece-30910

02/25/2019, 11:07 PM
great! thanks for letting me know.
are you able to give me more information on what is planned for kubernetesx?
c

creamy-potato-29402

02/25/2019, 11:09 PM
We haven’t started designing it yet, but it will be like awsx — just like the underlying API, but with a couple of little things that make it “richer”
stuff like
myDeployment.mountFile
vs creating a
ConfigMap
and adding it to a volume list.
👍 1
w

white-balloon-205

02/26/2019, 1:31 AM
Just a note here - the
awsx.ecs.Image.fromPath
is just a wrapper that creates an
ECR
repository and builds and pushes a local Docker image to it. Effectively it just wraps these lines into a nice function: https://github.com/pulumi/pulumi-docker/blob/master/examples/aws/index.ts#L18-L45 You can use this as-is with Kubernetes if you want - or you can write similar code to work with whatever other registry you want to push to - DockerHub, GCR, ACR, or something you are self-hosting in your cluster - using
@pulumi/docker
directly. You should not need any
kubernetesx
like thing for this (and in fact, because Kubernetes itself doesn't have any built-in registry, it's not immediately clear that a
fromImage
will be part of such a library).
l

lemon-greece-30910

02/26/2019, 10:18 PM
thanks for the tip. can you give me an example of how i would implement this "as-is"? i am trying to create a caddy server:
Copy code
image: awsx.ecs.Image.fromPath("caddy", {
                                    dockerfile: "./src"
                                }),
unlike in the example on the pulumi website (which i guess is incorrect?), it seems
fromPath
in the latest version (0.16.5) requires 2 parameters. but i cant figure out how the second parameter needs to be specified. it would help if i could get an example.
4 Views