This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 4. Getting started with Knative services
Knative services are Kubernetes services that a user creates to deploy a serverless application. Each Knative service is defined by a route and a configuration, contained in a .yaml
file.
4.1. Creating a Knative service 링크 복사링크가 클립보드에 복사되었습니다!
To create a service, you must create the service.yaml
file.
You can copy the sample below. This sample will create a sample golang application called helloworld-go
and allows you to specify the image for that application.
4.2. Deploying a serverless application 링크 복사링크가 클립보드에 복사되었습니다!
To deploy a serverless application, you must apply the service.yaml
file.
Procedure
-
Navigate to the directory where the
service.yaml
file is contained. Deploy the application by applying the
service.yaml
file.oc apply --filename service.yaml
$ oc apply --filename service.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Now that service has been created and the application has been deployed, Knative will create a new immutable revision for this version of the application.
Knative will also perform network programming to create a route, ingress, service, and load balancer for your application, and will automatically scale your pods up and down based on traffic, including inactive pods.