使用 spring cloud skipper 在 k8s 上附加版本作为服务/部署名称的合理背后 [英] Rational behind appending versions as Service/Deployment name on k8s with spring cloud skipper

查看:42
本文介绍了使用 spring cloud skipper 在 k8s 上附加版本作为服务/部署名称的合理背后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Spring Cloud 数据流世界有点陌生,在玩这个框架时,我发现如果我有一个流 = 'test-steram' 和 1 个名为app"的应用程序.当我使用船长部署到 kubernetes 时,我看到它创建了 pod/deployment &名称为

I am kind of new the spring cloud dataflow world and while playing around with the framework, I see that if I have a stream = 'test-steram' with 1 application called 'app'. When I deploy using skipper to kubernetes, I see that It creates pod/deployment & service on kubernetes with name as

test-stream-app-v1.

test-stream-app-v1.

我的问题是为什么我们需要在 k8s 上的服务/部署名称中使用 v1?它在使用 Spring Cloud Dataflow 的整个工作流中扮演什么角色?

My question is why do we need to have v1 in service/deployment names on k8s? What role does it play in the overall workflow using spring cloud dataflow?

------跟进-----------

------Follow up -----------

只是想确认几点以确保我在正确的轨道上理解流程

Just wanted to confirm few points to make sure i am on right track to understand the flow

  • 我的理解是与传统的流(通过 kafka 主题绑定)服务(kubernetes 上的对象)并没有发挥重要作用.

  • My understanding is with traditional stream (bind through kafka topics) service (object on kubernetes) do not play a significant role.

滚动更新(红/黑)模式在船长中以下列方式实现,部署/服务中的版本控制在以下方式中发挥作用.

Rolling Update (Red/Black) pattern has implemented in following way in skipper and versioning in deployment/service plays a role in following way.

让我们假设 app-v1 部署已经存在并请求升级.Skipper 创建 app-v2 部署和等待它准备好.一旦准备就绪,它就会销毁 app-v1

Let's assume that app-v1 deployment already exists and upgrade is requested. Skipper creates app-v2 deployment and wait for it to be ready. Once ready it destroys app-v1

如果我的上述理解是正确的,我有以下后续问题...

If my above understanding is right I have following follow up questions...

  1. 我看到船长可以部署和打包(它不必是传统的流)来使用.那是长期计划还是 Skipper 仅用于处理 spring-cloud-dataflow 流?

  1. I see that skipper can deploy and package (and it do not have to be a traditional stream) to work with. Is that the longer term plan or Skipper is only intended to work spring-cloud-dataflow streams?

如果是非传统流包,其中一个包在一个组中有多个应用程序(其余微服务),这种版本控制模型将如何工作?我的意思是当我想从其他微服务调用微服务时,我不可能知道或不太理想地知道应用程序的发布版本?

In case of non-tradtional stream package, where an package has multiple apps(rest microservices) in a group, how this model of versioning will work? I mean when I want to call the microservice from other microservice, I cannot possibly know or less than ideal to know the release-version of the app?

推荐答案

@Anand.祝贺第 1 个帖子!

@Anand. Congrats on the 1st post!

命名约定的理念是,如果 Skipper 与 SCDF 一起使用,则每个流应用程序都是版本化"的.作为用户,当您按需或通过 CI/CD 自动化滚动升级和滚动降级流应用程序版本或特定于应用程序的属性时,版本会受到影响.

The naming convention goes by the idea that each of the stream application is "versioned" if Skipper is used with SCDF. The version gets bumped for when, as a user, when you rolling-upgrade and rolling-downgrade the streaming-application versions or the application-specific properties either on-demand or via CI/CD automation.

它与持续交付和持续部署工作流非常相关,我们通过 stream update ..stream rollback .. 等命令在 SCDF 中提供本机选项> 分别.对于这些操作中的任何一个,应用程序都将在 K8s 中滚动更新,每个操作都会使应用程序名称中的数字增加.在您的示例中,您会将它们视为 test-stream-app-v1、`test-stream-app-v2 等

It is very relevant for continuous-delivery and continuous-deployment workflows, and we provide native options in SCDF through commands such as stream update .. and stream rollback .. respectively. For any of these operations, the applications will be rolling updated in K8s, and each action will bump the number in the application name. In your example, you'd see them as test-stream-app-v1, `test-stream-app-v2, etc.

将所有历史版本放在一个中心位置(即 Skipper 的数据库),您将能够通过 stream history..stream manifest.. 与它们交互代码> SCDF 中的命令.

With all the historical versions in a central place (i.e., Skipper's database), you'd be able to interact with them via stream history.. and stream manifest .. commands in SCDF.

要详细了解这一切,请观看此演示-网络研讨会(从@~41.25 开始),并查看 参考指南.

To learn more about all this, watch this demo-webinar (starts @ ~41.25), and also have a look at samples in the reference guide.

我希望这会有所帮助.

这篇关于使用 spring cloud skipper 在 k8s 上附加版本作为服务/部署名称的合理背后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆