Last active
December 13, 2022 08:49
-
-
Save wohugb/66891e42414d33eba711f317f6c463a6 to your computer and use it in GitHub Desktop.
knative 配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 在Knative使用自定义域名 | |
kubectl edit cm config-domain --namespace knative-serving | |
# https://help.aliyun.com/document_detail/127204.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 修改mydomain.com 为你的域名 | |
apiVersion: v1 | |
data: | |
mydomain.com: "" | |
kind: ConfigMap | |
[...] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 添加自定义路由 | |
# https://help.aliyun.com/document_detail/184836.html | |
# 修改 knative.aliyun.com/serving-ingress: 后面的域名 | |
apiVersion: serving.knative.dev/v1 | |
kind: Service | |
metadata: | |
name: coffee-mydomain | |
annotations: | |
knative.aliyun.com/serving-ingress: cafe.mydomain.com/coffee | |
spec: | |
template: | |
spec: | |
containers: | |
- image: registry.cn-hangzhou.aliyuncs.com/knative-sample/helloworld-go:160e4dc8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 配置HTTPS证书访问 | |
# https://help.aliyun.com/document_detail/185307.html | |
# knative.k8s.alibabacloud/tls: "true" | |
apiVersion: serving.knative.dev/v1 | |
kind: Service | |
metadata: | |
name: helloworld | |
namespace: default | |
annotations: | |
knative.k8s.alibabacloud/tls: "true" | |
spec: | |
template: | |
spec: | |
containers: | |
- image: registry-vpc.cn-shenzhen.aliyuncs.com/knative-sample/helloworld-go:73fbdd56 | |
env: | |
- name: TARGET | |
value: "Knative" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment