@@ -14,21 +14,21 @@ Follow [this guide](https://openfunction.dev/docs/getting-started/quickstarts/pr
1414
15152 . Create function
1616
17- For sample function below, modify the `` spec.image `` field in `` function-buildah- java.yaml`` to your own container registry address:
17+ For sample function below, modify the `` spec.image `` field in `` sample- java-app .yaml`` to your own container registry address:
1818
1919 ``` yaml
2020 apiVersion : core.openfunction.io/v1beta1
2121 kind : Function
2222 metadata :
23- name : function-buildah- java
23+ name : sample- java-app
2424 spec :
2525 image : " <your registry name>/sample-buildah-java:latest"
2626 ` ` `
2727
2828Use the following command to create this Function:
2929
3030 ` ` ` shell
31- kubectl apply -f function-buildah- java.yaml
31+ kubectl apply -f sample- java-app .yaml
3232 ```
3333
34343 . Access function
@@ -39,21 +39,21 @@ You can observe the process of a function with the following command:
3939 kubectl get functions.core.openfunction.io
4040
4141 NAME BUILDSTATE SERVINGSTATE BUILDER SERVING ADDRESS AGE
42- function-buildah- java Succeeded Running builder-jgnzp serving-q6wdp http://function-buildah- java.default.svc.cluster.local/ 22m
42+ sample- java-app Succeeded Running builder-jgnzp serving-q6wdp http://sample- java-app .default.svc.cluster.local/ 22m
4343 ```
4444
4545The ` Function.status.addresses ` field provides various methods for accessing functions.
4646Get ` Function ` addresses by running following command:
4747
4848 ``` shell
49- kubectl get function function-buildah- java -o=jsonpath=' {.status.addresses}'
49+ kubectl get function sample- java-app -o=jsonpath=' {.status.addresses}'
5050 ```
5151
5252You will get the following address:
5353
5454 ``` json
55- [{"type" :" External" ,"value" :" http://function-buildah- java.default.ofn.io/" },
56- {"type" :" Internal" ,"value" :" http://function-buildah- java.default.svc.cluster.local/" }]
55+ [{"type" :" External" ,"value" :" http://sample- java-app .default.ofn.io/" },
56+ {"type" :" Internal" ,"value" :" http://sample- java-app .default.svc.cluster.local/" }]
5757 ```
5858
5959 > You can use the following command to create a pod in the cluster and access the function from the pod:
@@ -65,13 +65,13 @@ You will get the following address:
6565Access functions by the internal address:
6666
6767 ` ` ` shell
68- curl http://function-buildah- java.default.svc.cluster.local
68+ curl http://sample- java-app .default.svc.cluster.local
6969 ```
7070
7171Access functions by the external address:
7272 > To access the function via the Address of type ` External ` in ` Funtion.status ` , you should configure local domain first, see [ Configure Local Domain] ( https://openfunction.dev/docs/operations/networking/local-domain/ ) .
7373
7474 ``` shell
75- curl http://function-buildah- java.default.ofn.io
75+ curl http://sample- java-app .default.ofn.io
7676 ```
7777
0 commit comments