Fix scala sample of serving (#3070)

Signed-off-by: 杨阳 10014842 <yangyang1@zte.com.cn>
This commit is contained in:
Alex Yang 2020-12-04 09:11:09 +08:00 committed by GitHub
parent 256f6cdf10
commit 3e023d3524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 17 deletions

View File

@ -20,10 +20,6 @@ cd knative-docs/docs/serving/samples/hello-world/helloworld-scala
- [Docker](https://www.docker.com) installed locally, and running, optionally a
Docker Hub account configured or some other Docker Repository installed
locally.
- [Java JDK8 or later](https://adoptopenjdk.net/installation.html) installed
locally.
- [Scala's](https://scala-lang.org/) standard build tool
[sbt](https://www.scala-sbt.org/) installed locally.
## Configuring the Service descriptor
@ -41,12 +37,10 @@ spec:
template:
spec:
containers:
- image: docker.io/{username}/helloworld-scala
env:
- name: MESSAGE
value: "Scala & Akka on Knative says hello!"
- name: HOST
value: "localhost"
- image: docker.io/{username}/helloworld-scala
env:
- name: TARGET
value: "Scala Sample v1"
```
## Publishing to Docker
@ -63,10 +57,10 @@ docker push {username}/helloworld-scala
## Deploying to Knative Serving
Apply the [Service yaml definition](./helloworld-scala.yaml):
Apply the [Service yaml definition](./service.yaml):
```shell
kubectl apply --filename helloworld-scala.yaml
kubectl apply --filename service.yaml
```
Then find the service host:
@ -89,9 +83,5 @@ curl -v http://helloworld-scala.default.1.2.3.4.xip.io
## Cleanup
```shell
kubectl delete --filename helloworld-scala.yaml
```
```
kubetl delete --filename helloworld-scala.yaml
kubectl delete --filename service.yaml
```