OpenShift 卷曲 POST 请求
我正在尝试从 CronJob 到 OpenShift 中的另一个部署执行简单的 http-post-request。 Get-Requests 工作得很好,但我不知道如何调整curl-命令来执行http-post。 对于 get-request 我使用了这个: Openshift cron job curl
我尝试了很多方法。这里有两个清单片段,不起作用
containers:
- name: my-container
image: rhel7
command:
- curl
- '-X POST'
- '-kvs'
- >-
http://target-deployment:8080/api/v1/sync/triggerAction
。
containers:
- name: my-container
image: rhel7
command:
- curl
- '-X POST -kvs'
- >-
http://target-deployment:8080/api/v1/sync/triggerAction
感谢您的任何想法和帮助!
I'm trying to do a simple http-post-request from a CronJob to another Deployment in OpenShift. Get-Requests work just fine, but I cannot figure out, how to adapt the curl-command to execute a http-post.
For the get-request I used this: Openshift cron job curl
I tried many thins. Here two manifest-snippets, which don't work
containers:
- name: my-container
image: rhel7
command:
- curl
- '-X POST'
- '-kvs'
- >-
http://target-deployment:8080/api/v1/sync/triggerAction
.
containers:
- name: my-container
image: rhel7
command:
- curl
- '-X POST -kvs'
- >-
http://target-deployment:8080/api/v1/sync/triggerAction
Thanks for any ideas and your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为解决方案,我只使用另一个图像。 Curl具有官方的Docker Hub图像。
对我有用的代码看起来像:
As a solution, I just use another image. Curl has an official docker hub image.
The code, that works for me, looks like: