OpenShift Container Platform 4.10 监控prometheus-k8s -n openshift-monitoring` $ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://thanos-querier.openshift- monitoring.svc:9091/api/v1/query get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host'` $ NAMESPACE=ns1 $ curl -X GET -kG "https://$THANOS_QUERIER_HOST/api/v1/query?" --data-urlencode "query=up{namespace='$NAMESPACE'}" OpenShift Container Platform 中,指标通过 /metrics 规范名称下的 HTTP 服务端点公开。您可以通 过针对 http:///metrics 运行 curl 查询来列出服务的所有可用指标。例如,您可以向 prometheus-example-app 示例服务公开路由,然后运行以下命令来查看其所有可用指标: 输 输出示例 出示例 其他 其他资 资源 0 码力 | 135 页 | 1.58 MB | 1 年前3
OpenShift Container Platform 4.13 网络describe pod$ curl -u : http:// : /metrics $ curl -u user:password https:// : /metrics -k $ curl -u : http:// django-psql-example OpenShift Container Platform 4.13 网 网络 络 72 b. 运行以下 curl 命令或在浏览器中访问路由主机名: 3. 对于 404 自定义 http 错误代码响应: a. 访问不存在的路由或路由不正确。 b. 运行以下 curl 命令或在浏览器中访问路由主机名: 4. 检查 haproxy.config 文件中的 errorfile 属性是否正确: HAProxy 进程不会启动。有关这个参数的更多信息,请参阅"Ingress Controller 配置参数"部分中的表。 7.9. 其他资源 配置自定义 PKI $ curl -vk $ curl -vk $ oc -n openshift-ingress rsh cat /var/lib/haproxy/conf/haproxy 0 码力 | 697 页 | 7.55 MB | 1 年前3
OpenShift Container Platform 4.4 构建(build)BuildConfig 中定义 GitHub Webhook 触发器,并由 Gogs 服务器触发它。 2. 提供含有有效 JSON 内容的文件后,如 payload.json,您可以使用 curl 手动触发 Webhook: $ curl -H "X-GitHub-Event: push" -H "Content-Type: application/json" -k -X POST --data- binary GitLab 设置说明,将 Webhook URL 粘贴到 GitLab 存储库设置中。 2. 提供含有有效 JSON 内容的文件后,如 payload.json,您可以使用 curl 手动触发 Webhook: $ curl -H "X-GitLab-Event: Push Hook" -H "Content-Type: application/json" -k -X POST -- data-binary Bitbucket 设置说明,将 Webhook URL 粘贴到 Bitbucket 存储库设置中。 2. 提供含有有效 JSON 内容的文件后,如 payload.json,您可以使用 curl 手动触发 Webhook: $ curl -H "X-Event-Key: repo:push" -H "Content-Type: application/json" -k -X POST --data- binary0 码力 | 101 页 | 1.12 MB | 1 年前3
OpenShift Container Platform 4.13 CI/CD服务器,也可以在 BuildConfig 中定义 GitHub Webhook 触发器,并由 Gogs 服务器触发它。 2. 提供含有有效 JSON 内容的文件后,如 payload.json,您可以使用 curl 手动触发 Webhook: 只有在 API 服务器没有适当签名的证书时,才需要 -k 参数。 注意 注意 只有 GitHub Webhook 事件的 ref 值与 BuildConfig 资源中的 com:443/apis/build.openshift.io/v1/namespaces//buildconfigs/ /webhooks/ /github $ curl -H "X-GitHub-Event: push" -H "Content-Type: application/json" -k -X POST --data- binary @payload.json 值。 c. 按照 GitLab 设置说明,将 Webhook URL 粘贴到 GitLab 存储库设置中。 2. 提供含有有效 JSON 内容的文件后,如 payload.json,您可以使用 curl 手动触发 Webhook: 只有在 API 服务器没有适当签名的证书时,才需要 -k 参数。 2.8.1.1.3. 使用 使用 Bitbucket Webhook 当存储库更新时,Bitbucket 0 码力 | 129 页 | 1.37 MB | 1 年前3
OpenShift Container Platform 4.9 网络OPERATOR 59 2. 对于 503 自定义 http 错误代码响应: a. 停止应用的所有容器集。 b. 运行以下 curl 命令或在浏览器中访问路由主机名: 3. 对于 404 自定义 http 错误代码响应: a. 访问不存在的路由或路由不正确。 b. 运行以下 curl 命令或在浏览器中访问路由主机名: 4. 检查 haproxy.config 文件中的 errorfile 属性是否正确: 属性是否正确: 6.9. 其他资源 配置自定义 PKI $ oc new-app django-psql-example $ curl -vk$ curl -vk $ oc -n openshift-ingress rsh cat /var/lib/haproxy/conf/haproxy.config | Running 0 8h $ oc exec -it -n openshift-ptp -c cloud-event-proxy -- curl 127.0.0.1:9091/metrics OpenShift Container Platform 4.9 网 网络 络 108 指定您要查询的 pod,例如 linuxptp-daemon-2t78p。 0 码力 | 388 页 | 4.04 MB | 1 年前3
OpenShift Container Platform 4.6 网络io/cookie_name="my_cookie" $ ROUTE_NAME=$(oc get route-o jsonpath='{.spec.host}') $ curl $ROUTE_NAME -k -c /tmp/cookie_jar 第 第 15 章 章 配置路由 配置路由 201 1 15.1.6. 基于路径的路由 基于路径的路由指定了一个路径组件,可以与 Controller 可以为它公开的所有路由设置默认选项。单个路由可以通过在其注解中提供特定配置来 覆盖这些默认设置。红帽不支持在 Operator 管理的路由中添加路由注解。 重要 重要 $ curl $ROUTE_NAME -k -b /tmp/cookie_jar apiVersion: v1 kind: Route metadata: name: route-unsecured spec: oc expose service 命令来公开路由: 输 输出示例 出示例 4. 要验证服务是否已公开,您可以使用 cURL 等工具来确保可从集群外部访问该服务。 a. 使用 oc get route 命令查找路由的主机名: 输 输出示例 出示例 b. 使用 cURL 检查主机是否响应 GET 请求: 输 输出示例 出示例 16.3.5. 通过路由标签(label)配置 Ingress 0 码力 | 256 页 | 2.78 MB | 1 年前3
OpenShift Container Platform 4.13 安装print-stream-json | jq -r '.architectures.x86_64.artifacts.azurestack.formats."vhd.gz".disk.location') $ curl -O -L ${COMPRESSED_VHD_URL} OpenShift Container Platform 4.13 安装 安装 982 5. 从 Red Hat OpenShift print-stream-json | jq -r '.architectures.x86_64.artifacts.azurestack.formats."vhd.gz".disk.location') $ curl -O -L ${COMPRESSED_VHD_URL} 第 第 8 章 章 在 在 AZURE STACK HUB 上安装 上安装 1003 3. 将本地 VHD 上传到 Azure Stack storage container create --name vhd --account-name ${CLUSTER_NAME}sa --account- key ${ACCOUNT_KEY} $ curl -O -L ${COMPRESSED_VHD_URL} 第 第 8 章 章 在 在 AZURE STACK HUB 上安装 上安装 1053 注意 注意 解压缩的 VHD 文件大约为 160 码力 | 4634 页 | 43.96 MB | 1 年前3
OpenShift Container Platform 4.8 CLI 工具proxy only part of the kubernetes api and also some static files. # You can get pods info with 'curl localhost:8001/api/v1/pods' oc proxy --www=/my/files --www-prefix=/static/ --api-prefix=/api/ # To proxy the entire kubernetes api at a different root. # You can get pods info with 'curl localhost:8001/custom/api/v1/pods' oc proxy --api-prefix=/custom/ # Run a proxy to kubernetes apiserver exe odo-windows- amd64.exe.zip $ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift- v4/clients/odo/latest/odo-linux-amd64 -o odo $ curl -L https://developers.redhat.com/0 码力 | 152 页 | 1.24 MB | 1 年前3
OpenShift Container Platform 4.14 安装print-stream-json | jq -r '.architectures.x86_64.artifacts.azurestack.formats."vhd.gz".disk.location') $ curl -O -L ${COMPRESSED_VHD_URL} OpenShift Container Platform 4.14 安装 安装 1112 重要 重要 安装程序会在用来安装集群的计 print-stream-json | jq -r '.architectures.x86_64.artifacts.azurestack.formats."vhd.gz".disk.location') $ curl -O -L ${COMPRESSED_VHD_URL} OpenShift Container Platform 4.14 安装 安装 1126 5. 从 Red Hat OpenShift storage container create --name vhd --account-name ${CLUSTER_NAME}sa --account- key ${ACCOUNT_KEY} $ curl -O -L ${COMPRESSED_VHD_URL} $ az storage blob upload --account-name ${CLUSTER_NAME}sa --account-key0 码力 | 3881 页 | 39.03 MB | 1 年前3
OpenShift Container Platform 4.13 认证和授权如果用户无法登录,则执行fail.cgi ,并做出 HTTP 401 响应。 7.4.8. 基本身份验证故障排除 最常见的问题与后端服务器网络连接相关。要进行简单调试,请在 master 上运行 curl 命令。要测试成功 的登录,请将以下示例命令中的和 替换为有效的凭证。要测试无效的登录,请将它 们替换为错误的凭证。 成功 成功响应 响应 200 状态并带有 修改。 成功响应可以有选择地提供附加数据,例如: 使用 name 键的显示名称: 使用 email 键的电子邮件地址: 使用 preferred_username 键的首选用户名: $ curl --cacert /path/to/ca.crt --cert /path/to/client.crt --key /path/to/client.key -u : headers: - X-Remote-User # curl -L -k -H "X-Remote-User: joe" \ --cert /etc/pki/tls/certs/authproxy.pem \ https:// /oauth/token/request # curl -L -k -H "X-Remote-User: joe" \ 0 码力 | 201 页 | 2.74 MB | 1 年前3
共 36 条
- 1
- 2
- 3
- 4













