OpenShift Container Platform 4.10 CLI 工具
1.77. oc image extract 将文件从镜像复制到文件系统 用法示例 用法示例 # Add a new layer to the image and store the result on disk # This results in $(pwd)/v2/mysql/blobs,manifests oc image append --from mysql:latest file://mysql:local layer.tar.gz # Add a new layer to the image and store the result on disk in a designated directory # This will result in $(pwd)/mysql-local/v2/mysql/blobs,manifests oc image append --from containers of daemonset abc to 'nginx:1.9.1' oc set image daemonset abc *=nginx:1.9.1 # Print result (in yaml format) of updating nginx container image from local file, without hitting the server0 码力 | 120 页 | 1.04 MB | 1 年前3OpenShift Container Platform 4.13 CLI 工具
mysql:latest --to myregistry.com/myimage:latest layer.tar.gz # Add a new layer to the image and store the result on disk # This results in $(pwd)/v2/mysql/blobs,manifests oc image append --from mysql:latest file://mysql:local layer.tar.gz # Add a new layer to the image and store the result on disk in a designated directory # This will result in $(pwd)/mysql-local/v2/mysql/blobs,manifests oc image append --from containers of daemonset abc to 'nginx:1.9.1' oc set image daemonset abc *=nginx:1.9.1 # Print result (in yaml format) of updating nginx container image from local file, without hitting the server0 码力 | 128 页 | 1.11 MB | 1 年前3OpenShift Container Platform 4.8 CLI 工具
mysql:latest --to myregistry.com/myimage:latest layer.tar.gz # Add a new layer to the image and store the result on disk # This results in $(pwd)/v2/mysql/blobs,manifests oc image append --from mysql:latest file://mysql:local layer.tar.gz # Add a new layer to the image and store the result on disk in a designated directory # This will result in $(pwd)/mysql-local/v2/mysql/blobs,manifests oc image append --from containers of daemonset abc to 'nginx:1.9.1' oc set image daemonset abc *=nginx:1.9.1 # Print result (in yaml format) of updating nginx container image from local file, without hitting the server0 码力 | 152 页 | 1.24 MB | 1 年前3OpenShift Container Platform 4.9 构建应用程序
weight=1 的单一服务,因此所有请求都会进入该服务。添加其他服务作为 alternateBackend 并 调整 weight,即可激活 A/B 设置。这可通过 oc set route-backends 命令或编辑路由来完成。 如果将 oc set route-backend 设为 0,则服务不参与负载均衡,但继续为现有的持久连接服务。 注意 注意 对路由的更改只会改变流量进入各个服务的比例。您可能需要扩展部署来调整 OpenShift Container Platform 4.9 构 构建 建应 应用程序 用程序 120 1. 要管理由路由均衡负载的服务以及对应的权重,请使用 oc set route-backends 命令: 例如,以下命令将 ab-example-a 设为主服务 ( weight=198) 并将 ab-example-b 设为第一替代 服务 (weight=2): 这意味着 99% 的流量发送到服务 set route-backends ROUTENAME \ [--zero|--equal] [--adjust] SERVICE=WEIGHT[%] [...] [options] $ oc set route-backends ab-example ab-example-a=198 ab-example-b=2 $ oc set route-backends ab-example0 码力 | 184 页 | 3.36 MB | 1 年前3OpenShift Container Platform 4.10 构建应用程序
weight=1 的单一服务,因此所有请求都会进入该服务。添加其他服务作为 alternateBackend 并 调整 weight,即可激活 A/B 设置。这可通过 oc set route-backends 命令或编辑路由来完成。 注意 注意 使用 alternateBackends 时,也使用 roundrobin 负载均衡策略来确保请求按预 期分发到服务。通过使用路由注解,可以为路由设置 8. 点击 Create。 8.4.5.1.3. 使用 使用 CLI 管理 管理权 权重 重 流程 流程 1. 要管理由路由均衡负载的服务以及对应的权重,请使用 oc set route-backends 命令: 例如,以下命令将 ab-example-a 设为主服务 ( weight=198) 并将 ab-example-b 设为第一替代 服务 (weight=2): 这意味着 99% 的流量发送到服务 来处理请求负载。 2. 不带标志运行命令来验证当前配置: $ oc set route-backends ROUTENAME \ [--zero|--equal] [--adjust] SERVICE=WEIGHT[%] [...] [options] $ oc set route-backends ab-example ab-example-a=198 ab-example-b=2 OpenShift0 码力 | 198 页 | 3.62 MB | 1 年前3OpenShift Container Platform 4.7 安装
GenerateConfig(context): 第 第 6 章 章 在 在 GCP 上安装 上安装 827 backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id'] , 'type': 'compute.v1.regionBackendService', 'properties': { 'backends': backends, 'healthChecks': ['$(ref.' + context.properties['infra_id'] + '-api-internal-health- py Deployment Manager 模板 模板 def GenerateConfig(context): backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id']0 码力 | 2276 页 | 23.68 MB | 1 年前3OpenShift Container Platform 4.8 安装
return {'resources': resources} def GenerateConfig(context): backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id'] OpenShift Container Platform 集群使用。创建此组件的一种方法是修改提供的 Deployment Manager 模板。 注意 注意 'backends': backends, 'healthChecks': ['$(ref.' + context.properties['infra_id'] + '-api-internal-health- return {'resources': resources} def GenerateConfig(context): backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id']0 码力 | 2586 页 | 27.37 MB | 1 年前3OpenShift Container Platform 4.10 安装
return {'resources': resources} def GenerateConfig(context): backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id'] , 'type': 'compute.v1.regionBackendService', 'properties': { 'backends': backends, OpenShift Container Platform 4.10 安装 安装 1130 创建外部集群时,除了 02_lb_ext.py 模板外,还需要此模板。 8.10 return {'resources': resources} def GenerateConfig(context): backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id']0 码力 | 3142 页 | 33.42 MB | 1 年前3OpenShift Container Platform 4.14 安装
GenerateConfig(context): 第 第 9 章 章 在 在 GCP 上安装 上安装 1405 backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id'] , 'type': 'compute.v1.regionBackendService', 'properties': { 'backends': backends, 'healthChecks': ['$(ref.' + context.properties['infra_id'] + '-api-internal-health- py Deployment Manager 模板 模板 def GenerateConfig(context): backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id']0 码力 | 3881 页 | 39.03 MB | 1 年前3OpenShift Container Platform 4.13 安装
return {'resources': resources} def GenerateConfig(context): backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id'] , 'type': 'compute.v1.regionBackendService', 'properties': { 'backends': backends, OpenShift Container Platform 4.13 安装 安装 1346 创建外部集群时,除了 02_lb_ext.py 模板外,还需要此模板。 9.11 return {'resources': resources} def GenerateConfig(context): backends = [] for zone in context.properties['zones']: backends.append({ 'group': '$(ref.' + context.properties['infra_id']0 码力 | 4634 页 | 43.96 MB | 1 年前3
共 15 条
- 1
- 2