Anthos - GKE - 无法使用 kf 部署应用
我已从 GCP 上的市场部署了“Anthos Sample Deployment”。我看到它创建了 GKE 集群,并且也在 Anothos 中注册。我看到示例应用程序的 Pod 也已部署。集群启动并运行后,我想尝试“kf”(https: //cloud.google.com/migrate/kf/docs/2.7/getting-started),因此为了配置“kf”,我执行了谷歌文档中提到的以下步骤(https://cloud.google.com/migrate/kf/docs/2.7/ install#install)
当我尝试运行“kf create-space test-space-3
”时,它会打印“请求空间,等待创建子组件”,但该命令从不完成。因此,接下来我尝试使用“--log-http”标志执行相同的命令,我发现它很少进行 API 调用。
- 第一个 API:GET /api/v1/namespaces/kf - 200 OKResponse
- 第二个 API:GET /api/ v1/namespaces/kf - 200 OKResponse
- 第三个 API:POST /apis/kf.dev/v1alpha1/spaces - 201 创建
- 第四个 API:GET /apis/kf.dev/v1alpha1/spaces/test-space-3 - 200 OK
- 第 5 个 API:<与第 4 个相同>
它不断调用第 4 个 API,但从未完成。我不确定我是否遗漏了一些东西。 第四个 API 响应:
{"apiVersion":"kf.dev/v1alpha1","kind":"Space","metadata":{"creationTimestamp":"2022-03-02T13:45:25Z","generation":1,"managedFields":[{"apiVersion":"kf.dev/v1alpha1","fieldsType":"FieldsV1","fieldsV1":{"f:spec":{".":{},"f:buildConfig":{".":{},"f:defaultToV3Stack":{}},"f:networkConfig":{".":{},"f:appNetworkPolicy":{},"f:buildNetworkPolicy":{}},"f:runtimeConfig":{}}},"manager":"kf","operation":"Update","time":"2022-03-02T13:45:25Z"}],"name":"test-space-3","resourceVersion":"825403","uid":"3cf7ef08-1ab1-4473-b7da-dd6511a6a775"},"spec":{"buildConfig":{"containerRegistry":"us-central1-docker.pkg.dev/<project-id>/demo-dev-kf-cluster","defaultToV3Stack":null,"serviceAccount":"kf-builder"},"networkConfig":{"appNetworkPolicy":{"egress":"PermitAll","ingress":"PermitAll"},"buildNetworkPolicy":{"egress":"PermitAll","ingress":"PermitAll"}},"runtimeConfig":{}}}
当我尝试部署任何应用程序时,行为相同。 命令:kf push nginx --docker-image=nginx:latest --log-http
- 第一个 API:GET /api/v1/namespaces/kf - 200 OKResponse
- 第二个 API:GET /apis/kf。 dev/v1alpha1/spaces/test-space-1 - 200 OK
- 第三个 API:GET /api/v1/namespaces/kf - 200 OK
- 第四个 API: GET /apis/kf.dev/v1alpha1/namespaces/test-space-1/apps/nginx ~ 404 Not Found,因为这是我第一次部署此应用程序
- 第 5 个 API:POST /apis/kf.dev/v1alpha1/命名空间/test-space-1/apps ~ 201 创建了
- 第 6 个 API:GET /apis/kf.dev/v1alpha1/namespaces/test-space-1/apps/nginx ~ 200 OK
,它不断调用第 6 个 API,并且命令永远不会完成。在第二个 API 响应中,我看到以下错误。不确定这是否是导致问题的原因。
{
"lastTransitionTime": "2022-03-01T13:56:05Z",
"message": "Error occurred while creating IAMPolicy: the server could not find the requested resource",
"reason": "ReconciliationError",
"status": "False",
"type": "IAMPolicyReady"
}
任何解决这个问题的指针都会非常有帮助。谢谢。
I have deployed "Anthos Sample Deployment" from marketplace on GCP. I see it created GKE cluster and it's registerd in Anothos as well. I see pods for sample app is also deployed. After cluster was up and running I wanted to try "kf" (https://cloud.google.com/migrate/kf/docs/2.7/getting-started), so to congifure "kf" I executed below mentioned steps from google documentation (https://cloud.google.com/migrate/kf/docs/2.7/install#install)
When I try to run "kf create-space test-space-3
", it prints "Space requested, waiting for subcomponents to be created", but the command never completes. So next I tried to execute same command with "--log-http" flag, and I see it makes few API calls..
- 1st API: GET /api/v1/namespaces/kf - 200 OKResponse
- 2nd API: GET /api/v1/namespaces/kf - 200 OKResponse
- 3rd API: POST /apis/kf.dev/v1alpha1/spaces - 201 Created
- 4th API: GET /apis/kf.dev/v1alpha1/spaces/test-space-3 - 200 OK
- 5th API: <Same as 4th>
It keeps calling 4th API, and never completes. I am not sure if I am missing something.
4th API Response:
{"apiVersion":"kf.dev/v1alpha1","kind":"Space","metadata":{"creationTimestamp":"2022-03-02T13:45:25Z","generation":1,"managedFields":[{"apiVersion":"kf.dev/v1alpha1","fieldsType":"FieldsV1","fieldsV1":{"f:spec":{".":{},"f:buildConfig":{".":{},"f:defaultToV3Stack":{}},"f:networkConfig":{".":{},"f:appNetworkPolicy":{},"f:buildNetworkPolicy":{}},"f:runtimeConfig":{}}},"manager":"kf","operation":"Update","time":"2022-03-02T13:45:25Z"}],"name":"test-space-3","resourceVersion":"825403","uid":"3cf7ef08-1ab1-4473-b7da-dd6511a6a775"},"spec":{"buildConfig":{"containerRegistry":"us-central1-docker.pkg.dev/<project-id>/demo-dev-kf-cluster","defaultToV3Stack":null,"serviceAccount":"kf-builder"},"networkConfig":{"appNetworkPolicy":{"egress":"PermitAll","ingress":"PermitAll"},"buildNetworkPolicy":{"egress":"PermitAll","ingress":"PermitAll"}},"runtimeConfig":{}}}
Same behavior when I try to deploy any app..
Command: kf push nginx --docker-image=nginx:latest --log-http
- 1st API: GET /api/v1/namespaces/kf - 200 OKResponse
- 2nd API: GET /apis/kf.dev/v1alpha1/spaces/test-space-1 - 200 OK
- 3rd API: GET /api/v1/namespaces/kf - 200 OK
- 4th API: GET /apis/kf.dev/v1alpha1/namespaces/test-space-1/apps/nginx ~ 404 Not Found, since this is the first time I am deploying this app
- 5th API: POST /apis/kf.dev/v1alpha1/namespaces/test-space-1/apps ~ 201 Created
- 6th API: GET /apis/kf.dev/v1alpha1/namespaces/test-space-1/apps/nginx ~ 200 OK
and it keeps calling 6th API continuously, and command never completes. In 2nd API response I see below error. Not sure if this is something which is causing the issue.
{
"lastTransitionTime": "2022-03-01T13:56:05Z",
"message": "Error occurred while creating IAMPolicy: the server could not find the requested resource",
"reason": "ReconciliationError",
"status": "False",
"type": "IAMPolicyReady"
}
Any pointer to resolve this will be really helpful. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论