按照链接 - https://docs.openshift.com/container-platform/4.1/serverless/installing-openshift-serverless.html在 Openshift v4.1 之上安装 KNative Serving。安装完所有 openshift 算子后,控制平面。链接中给出的会员名册等;我希望通过执行看到服务组件正在运行 -
C:\Knative installation>oc get knativeserving/knative-serving -n knative-serving --template='{{range .status.conditions}}{{printf "%s=%s\n" .type .status}}{{end}}'
但上面没有返回任何内容。只是返回提示。
下面还有服务组件的获取资源命令的 o/p -
C:\Knative installation>oc get knativeserving/knative-serving -n knative-serving
NAME VERSION READY REASON
knative-serving
C:\Knative installation>oc get knativeserving/knative-serving -n knative-serving -o yaml
apiVersion: serving.knative.dev/v1alpha1
kind: KnativeServing
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"serving.knative.dev/v1alpha1","kind":"KnativeServing","metadata": {"annotations":{},"name":"knative-serving","namespace":"knative-serving"}}
creationTimestamp: "2020-01-12T10:53:42Z"
generation: 1
name: knative-serving
namespace: knative-serving
resourceVersion: "63660251"
selfLink: /apis/serving.knative.dev/v1alpha1/namespaces/knative-serving/knativeservings/knative-serving
uid: cc4b330f-3529-11ea-83ef-0272cb600f74
有什么问题?我相信 KNative Serving 没有正确安装但不知道如何调试。我卸载并重新安装了几次,但没有帮助。
另外,我想继续并使用 KNative Serving 安装服务(参考链接https://docs.openshift.com/container-platform/4.1/serverless/getting-started-knative-services.html)但是,应用第一个资源显示问题。
服务.yaml
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: helloworld-go
namespace: default
spec:
template:
spec:
containers:
- image: gcr.io/knative-samples/helloworld-go
env:
- name: TARGET
value: "Go Sample v1"
应用 service.yaml 返回错误。
C:\start Knative service> oc apply --filename service.yaml
error: unable to recognize "service.yaml": no matches for kind "Service" in version "serving.knative.dev/v1alpha1"
任何帮助表示赞赏。谢谢。