mirror of https://github.com/knative/docs.git
parent
b5b93fb234
commit
73c8cb3e31
|
@ -19,29 +19,30 @@ Create a sample service:
|
||||||
|
|
||||||
=== "Apply YAML"
|
=== "Apply YAML"
|
||||||
|
|
||||||
1. Create a YAML file using the following example:
|
1. Create a YAML file using the following example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: serving.knative.dev/v1
|
apiVersion: serving.knative.dev/v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: helloworld-go
|
name: helloworld-go
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: gcr.io/knative-samples/helloworld-go
|
- image: gcr.io/knative-samples/helloworld-go
|
||||||
env:
|
env:
|
||||||
- name: TARGET
|
- name: TARGET
|
||||||
value: "Go Sample v1"
|
value: "Go Sample v1"
|
||||||
```
|
```
|
||||||
1. Apply the YAML file by running the command:
|
|
||||||
|
|
||||||
```bash
|
1. Apply the YAML file by running the command:
|
||||||
kubectl apply -f <filename>.yaml
|
|
||||||
```
|
```bash
|
||||||
Where `<filename>` is the name of the file you created in the previous step.
|
kubectl apply -f <filename>.yaml
|
||||||
|
```
|
||||||
|
Where `<filename>` is the name of the file you created in the previous step.
|
||||||
|
|
||||||
=== "kn CLI"
|
=== "kn CLI"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue