Is Skaffold the tool I should use?

145 views
Skip to first unread message

Keith Miller

unread,
Jan 19, 2022, 11:33:52 AM1/19/22
to skaffold-users
Hello all! So currently I have a Docker Compose script that sets up all of the external Docker images we need on a project. What I would like to do is instead of running locally have these images run in a GKE project for each developer and port forward to the local machine. The reason is that some of these images are x86_64 and don't run on Apple silicon. Can we use Skaffold to just manage these external Docker images for us?

Thank you!

- Keith

Tejal Desai

unread,
Jan 20, 2022, 12:26:58 PM1/20/22
to Keith Miller, skaffold-users
Hey Keith,

Skaffold maintainer here. You could definitely use `skaffold deploy --build-artifacts input.json`  to deploy already built images to GKE.
Below is sample input.json.
```
{
  "builds": [
    {
    "imageName": "frontend",
    "tag": "gcr.io/your-project/frontend:dev@sha256:blah"
    }
     {
    "imageName": "backend",
    "tag": "gcr.io/your-project/backend:dev@sha256:blah"
    }
  ]
}
```

We are currently working on a feature to build cross platform images to enable users on Apple silicon machines to build x86_64 images via locally installed docker.
You mentioned the images are "External docker images" so I am guessing you're not building these as part of your development process.
Let me know if you want to know more about building x_86 images on M1 machines.

Thanks
Tejal

--
You received this message because you are subscribed to the Google Groups "skaffold-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skaffold-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skaffold-users/7ceb3931-492d-4b30-8918-ea401876bbd0n%40googlegroups.com.

Keith Miller

unread,
Jan 20, 2022, 12:34:44 PM1/20/22
to Tejal Desai, skaffold-users
Thank you so much for this! Yeah, we don't build those external images and they are JNI heavy so I don't think we are getting apple silicon versions anytime soon. Thank you for the offer to help though!
--
Keith Miller
Mythical Games

Tejal Desai

unread,
Jan 20, 2022, 12:36:49 PM1/20/22
to Keith Miller, skaffold-users
No problem! Glad this was helpful.

Keith Miller

unread,
Jan 20, 2022, 11:39:20 PM1/20/22
to Tejal Desai, skaffold-users
Is there a way to run just the port-forwarding after you have run `skaffold deploy`? Reading the docs it looks like you have to rerun deploy if you get disconnected.

Thanks!

Tejal Desai

unread,
Jan 21, 2022, 11:49:33 AM1/21/22
to Keith Miller, skaffold-users
Hey Keith,

Can you tell me a little bit more about your use case? 

Skaffold deploy does not monitor the port-forwarding connections. You could use `skaffold run --tail` which builds. deploys and monitors the port-forwarding sessions. 

Thanks
Tejal

Keith Miller

unread,
Jan 21, 2022, 12:10:02 PM1/21/22
to Tejal Desai, skaffold-users
Sure thing. So in my skaffold.yaml I have:

apiVersion: skaffold/v2beta26
kind: Config
metadata:
  name: mythical-external
deploy:
  kubectl:
    manifests:
    - k8s/external -deployment.yaml
    - k8s/external -service.yaml

Then running `skaffold deploy --port-forward` works perfectly. I was just wondering if it was possible to run `skaffold deploy` then later on fire the port-forwarding call on it's own. If not no worries, running `skaffold deploy --port-forward` again works, it just rebuilds the services.

Thank you!

Nauman Ali

unread,
Jan 21, 2022, 12:17:18 PM1/21/22
to Keith Miller, Tejal Desai, skaffold-users
Hi Keith,
I'm a link builder and I'm working in an SEO Company. I have 5 years of experience in SEO (Search Engine Optimization)
We provide link-building service through posting articles on many High-Quality sites which can increase your website Quality example, DA, PA, and Traffic also.


Link Type:- Do-Follow and Permanent for each site.

We have many other High-Quality sites as well and we also work on other Categories such as Fashion, Health, Technology, Business, Real Estate, and other white Niche Categories.


Nauman Ali

unread,
Jan 21, 2022, 12:21:30 PM1/21/22
to Keith Miller, Tejal Desai, skaffold-users

Brian de Alwis

unread,
Jan 21, 2022, 5:20:16 PM1/21/22
to Keith Miller, Tejal Desai, skaffold-users
If not no worries, running `skaffold deploy --port-forward` again works, it just rebuilds the services.

Since you don't have any build.artifacts, the second deploy should be the same except that Skaffold will generate a new `run id`.  The run id is a label that we apply to the deployed manifests to track the deployed pods to enable logging and port-forwarding.  You can specify a fixed run id with the `-l` argument, such as:

skaffold deploy -l skaffold.dev/run-id=fixed --port-forward

(or any other value for `fixed`).  The deployed manifests should be identical and thus treated as a no-op by  Kubernetes.  You can see the actual rendered manifests with `skaffold render -l skaffold.dev/run-id=fixed`.

Brian.

Keith Miller

unread,
Jan 21, 2022, 5:33:21 PM1/21/22
to Brian de Alwis, Tejal Desai, skaffold-users
That was exactly what I was looking for, thank you so much!
Reply all
Reply to author
Forward
0 new messages