在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → Knative教程:服务、事件处理与GCP集成示例全解

Knative教程:服务、事件处理与GCP集成示例全解

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:3.37M
  • 下载次数:0
  • 浏览次数:7
  • 发布时间:2024-03-22
  • 实例类别:一般编程问题
  • 发 布 人:chenxiaolan
  • 文件格式:.zip
  • 所需积分:2
 相关标签:

实例介绍

【实例简介】
Knative教程
本教程全面展示了如何利用Knative的不同组成部分。包括Knative Serving、Knative Eventing和Knative-GCP项目的实际应用示例,以及如何在Google Kubernetes Engine(GKE)上安装Knative及其依赖项(例如Istio)。

环境要求
我们在以下环境中测试了本教程:
- GKE: 1.21.5-gke.1300
- Istio: 1.10.5
- Knative Serving: 1.0.0
- Knative Eventing: 1.0.0
- Knative-GCP: 0.23.0
- Tekton: 0.22.0

如果一切设置正确,所有Knative组件应显示为运行状态:
kubectl get pods -n knative-serving
kubectl get pods -n knative-eventing
kubectl get pods -n cloud-run-events
kubectl get pods -n tekton-pipelines

示例代码
Knative提供了丰富的示例来帮助开发者理解和掌握其功能,包括:
- Knative Serving的Hello World、配置变更、流量分割、自动扩缩等
- Knative Eventing的简单投递、复杂投递、带回复的复杂投递、Broker和Trigger投递等
- 与Google Cloud结合使用的Knative Eventing,如Cloud Pub/Sub触发的服务、Cloud Storage触发的服务、与翻译API和视觉API的集成等
- Tekton Pipelines的基本使用,包括Hello World Tekton、Google Container Registry构建和Docker Hub构建等
本教程不是Google官方产品。
【实例截图】
【核心代码】
文件清单
└── knative-tutorial-db678520e374b4cad819e5e4bf358e7483999833
    ├── build
    │   ├── deprecated
    │   │   ├── build-helloworld-docker.yaml
    │   │   ├── build-helloworld-gcr.yaml
    │   │   ├── buildtemplate-buildpack-sample-java-app-gcr.yaml
    │   │   ├── buildtemplate-kaniko-helloworld-gcr.yaml
    │   │   └── docker-secret.yaml
    │   ├── docker-secret.yaml
    │   ├── service-account.yaml
    │   ├── task-build-docker-images-from-git-source.yaml
    │   ├── task-helloworld.yaml
    │   ├── taskrun-build-helloworld-docker.yaml
    │   ├── taskrun-build-helloworld-gcr.yaml
    │   ├── taskrun-build-kaniko-helloworld-gcr.yaml
    │   └── taskrun-helloworld.yaml
    ├── CONTRIBUTING.md
    ├── docs
    │   ├── bigquery-processing-pipeline.md
    │   ├── brokercreation.md
    │   ├── brokertrigger.md
    │   ├── changeconfig.md
    │   ├── clusterlocal.md
    │   ├── complexdelivery.md
    │   ├── complexdeliverywithreply.md
    │   ├── configureautoscaling.md
    │   ├── deploycloudrun.md
    │   ├── deprecated
    │   │   ├── buildpacksbuildtemplate.md
    │   │   ├── dockerbuild.md
    │   │   ├── helloworldbuild.md
    │   │   └── kanikobuildtemplate.md
    │   ├── eventregistry.md
    │   ├── grpc-csharp.md
    │   ├── grpc.md
    │   ├── grpc-python.md
    │   ├── hellotekton.md
    │   ├── helloworldeventing-csharp.md
    │   ├── helloworldeventing.md
    │   ├── helloworldeventing-python.md
    │   ├── helloworldserving.md
    │   ├── image-processing-pipeline.md
    │   ├── images
    │   │   ├── bigquery-processing-pipeline.png
    │   │   ├── broker-trigger-delivery.png
    │   │   ├── cloud-run-console.png
    │   │   ├── cloud-run.png
    │   │   ├── complex-delivery.png
    │   │   ├── complex-delivery-reply.png
    │   │   ├── dockerhub-auto.png
    │   │   ├── dockerhub.png
    │   │   ├── gcr-javaapp.png
    │   │   ├── gcr.png
    │   │   ├── grpc.png
    │   │   ├── image-processing-pipeline.png
    │   │   ├── serverless-on-google-cloud.png
    │   │   ├── serverless-with-knative-cloudrun.png
    │   │   ├── simple-delivery.png
    │   │   ├── twilio-webhook-custom.png
    │   │   └── twilio-webhook.png
    │   ├── pubsubeventing.md
    │   ├── scheduledeventing.md
    │   ├── simpledelivery.md
    │   ├── storageeventing.md
    │   ├── tekton-dockerbuild.md
    │   ├── tekton-gcrbuild.md
    │   ├── trafficsplitting.md
    │   ├── translationeventing-csharp.md
    │   ├── translationeventing.md
    │   ├── translationeventing-python.md
    │   ├── twiliointegration-csharp.md
    │   ├── twiliointegration.md
    │   ├── twiliointegration-python.md
    │   ├── visioneventing-csharp.md
    │   ├── visioneventing.md
    │   └── visioneventing-python.md
    ├── eventing
    │   ├── brokertrigger
    │   │   ├── service1.yaml
    │   │   ├── service2.yaml
    │   │   ├── service3.yaml
    │   │   ├── source.yaml
    │   │   ├── trigger1.yaml
    │   │   ├── trigger2.yaml
    │   │   └── trigger3.yaml
    │   ├── complex
    │   │   ├── channel.yaml
    │   │   ├── service1.yaml
    │   │   ├── service2.yaml
    │   │   ├── source.yaml
    │   │   ├── subscription1.yaml
    │   │   └── subscription2.yaml
    │   ├── complexwithreply
    │   │   ├── channel1.yaml
    │   │   ├── channel2.yaml
    │   │   ├── service1.yaml
    │   │   ├── service2.yaml
    │   │   ├── service3.yaml
    │   │   ├── source.yaml
    │   │   ├── subscription1.yaml
    │   │   ├── subscription2.yaml
    │   │   └── subscription3.yaml
    │   ├── event-display
    │   │   ├── csharp
    │   │   │   ├── appsettings.Development.json
    │   │   │   ├── appsettings.json
    │   │   │   ├── Dockerfile
    │   │   │   ├── event-display.csproj
    │   │   │   ├── Program.cs
    │   │   │   ├── Properties
    │   │   │   │   └── launchSettings.json
    │   │   │   └── Startup.cs
    │   │   └── python
    │   │       ├── app.py
    │   │       └── Dockerfile
    │   ├── event-display-with-reply
    │   │   └── csharp
    │   │       ├── appsettings.Development.json
    │   │       ├── appsettings.json
    │   │       ├── Dockerfile
    │   │       ├── event-display-with-reply.csproj
    │   │       ├── Program.cs
    │   │       ├── Properties
    │   │       │   └── launchSettings.json
    │   │       └── Startup.cs
    │   ├── helloworld
    │   │   ├── curl-pod.yaml
    │   │   ├── kservice.yaml
    │   │   ├── service.yaml
    │   │   └── trigger.yaml
    │   ├── pictures
    │   │   ├── atamel.jpg
    │   │   ├── beach.jpg
    │   │   ├── bodrum.jpg
    │   │   ├── paris.jpg
    │   │   ├── river.jpg
    │   │   └── yachtclub.jpg
    │   ├── ping
    │   │   ├── source-broker.yaml
    │   │   ├── source.yaml
    │   │   └── trigger.yaml
    │   ├── pubsub
    │   │   ├── cloudpubsubsource-workload.yaml
    │   │   ├── cloudpubsubsource.yaml
    │   │   ├── kservice.yaml
    │   │   ├── service.yaml
    │   │   └── trigger.yaml
    │   ├── simple
    │   │   ├── service.yaml
    │   │   └── source.yaml
    │   ├── storage
    │   │   ├── cloudstoragesource.yaml
    │   │   ├── kservice.yaml
    │   │   ├── service.yaml
    │   │   └── trigger.yaml
    │   ├── translation
    │   │   ├── csharp
    │   │   │   ├── appsettings.Development.json
    │   │   │   ├── appsettings.json
    │   │   │   ├── Dockerfile
    │   │   │   ├── Program.cs
    │   │   │   ├── Properties
    │   │   │   │   └── launchSettings.json
    │   │   │   ├── Startup.cs
    │   │   │   ├── translation.csproj
    │   │   │   └── TranslationRequest.cs
    │   │   ├── kservice.yaml
    │   │   ├── python
    │   │   │   ├── app.py
    │   │   │   └── Dockerfile
    │   │   ├── service.yaml
    │   │   └── trigger.yaml
    │   └── vision
    │       ├── csharp
    │       │   ├── appsettings.Development.json
    │       │   ├── appsettings.json
    │       │   ├── Dockerfile
    │       │   ├── Program.cs
    │       │   ├── Properties
    │       │   │   └── launchSettings.json
    │       │   ├── Startup.cs
    │       │   └── vision.csproj
    │       ├── kservice.yaml
    │       ├── python
    │       │   ├── app.py
    │       │   └── Dockerfile
    │       ├── service.yaml
    │       └── trigger.yaml
    ├── LICENSE
    ├── README.md
    ├── serving
    │   ├── grpc
    │   │   ├── csharp
    │   │   │   ├── GrpcGreeter
    │   │   │   │   ├── appsettings.Development.json
    │   │   │   │   ├── appsettings.json
    │   │   │   │   ├── Dockerfile
    │   │   │   │   ├── GrpcGreeter.csproj
    │   │   │   │   ├── Program.cs
    │   │   │   │   ├── Properties
    │   │   │   │   │   └── launchSettings.json
    │   │   │   │   ├── Protos
    │   │   │   │   │   └── greet.proto
    │   │   │   │   ├── Services
    │   │   │   │   │   └── GreeterService.cs
    │   │   │   │   └── Startup.cs
    │   │   │   └── GrpcGreeterClient
    │   │   │       ├── GrpcGreeterClient.csproj
    │   │   │       ├── Program.cs
    │   │   │       └── Protos
    │   │   │           └── greet.proto
    │   │   ├── python
    │   │   │   ├── Dockerfile
    │   │   │   ├── greet_client.py
    │   │   │   ├── greet_pb2_grpc.py
    │   │   │   ├── greet_pb2.py
    │   │   │   ├── greet_server.py
    │   │   │   └── protos
    │   │   │       └── greet.proto
    │   │   └── service.yaml
    │   ├── helloworld
    │   │   ├── csharp
    │   │   │   ├── appsettings.Development.json
    │   │   │   ├── appsettings.json
    │   │   │   ├── Dockerfile
    │   │   │   ├── helloworld.csproj
    │   │   │   ├── Program.cs
    │   │   │   ├── Properties
    │   │   │   │   └── launchSettings.json
    │   │   │   └── Startup.cs
    │   │   ├── python
    │   │   │   ├── app.py
    │   │   │   └── Dockerfile
    │   │   ├── service-local.yaml
    │   │   ├── service-v1-pinned.yaml
    │   │   ├── service-v1v4-split.yaml
    │   │   ├── service-v1.yaml
    │   │   ├── service-v2.yaml
    │   │   ├── service-v3.yaml
    │   │   └── service-v4.yaml
    │   ├── sleepingservice
    │   │   ├── csharp
    │   │   │   ├── appsettings.Development.json
    │   │   │   ├── appsettings.json
    │   │   │   ├── Dockerfile
    │   │   │   ├── Program.cs
    │   │   │   ├── Properties
    │   │   │   │   └── launchSettings.json
    │   │   │   ├── sleepingservice.csproj
    │   │   │   └── Startup.cs
    │   │   ├── python
    │   │   │   ├── app.py
    │   │   │   └── Dockerfile
    │   │   └── service.yaml
    │   └── twilio
    │       ├── csharp
    │       │   ├── appsettings.Development.json
    │       │   ├── appsettings.json
    │       │   ├── Dockerfile
    │       │   ├── Program.cs
    │       │   ├── Properties
    │       │   │   └── launchSettings.json
    │       │   ├── SmsController.cs
    │       │   ├── Startup.cs
    │       │   └── twiliosample.csproj
    │       ├── python
    │       │   ├── app.py
    │       │   └── Dockerfile
    │       └── service.yaml
    └── setup
        ├── check-versions
        ├── config
        ├── configure-https
        ├── create-gke-cluster
        ├── install-dataplane-serviceaccount
        ├── install-eventing
        ├── install-knative-gcp
        ├── install-serving
        ├── install-tekton
        └── README.md

55 directories, 225 files

标签:

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警