OpenShift Container Platform 4.10 构建应用程序应用程序 用程序 82 1 1 例如,作为集群管理员,您可以通过在 ServiceBinding CR 中设置适当的 labelSelector 字段来将服务绑 定到带有 environment: production 标签的命名空间中的所有 Deployment。这可让 Service Binding Operator 将每个工作负载与一个 ServiceBinding CR 绑定。 binding service-binding-demo spec: application: labelSelector: 1 matchLabels: environment: production group: apps version: v1 resource: deployments services: group: "" version: namespace: service-binding-demo spec: workload: selector: 1 matchLabels: environment: production apiVersion: app/v1 kind: Deployment service: apiVersion: v1 kind: Secret0 码力 | 198 页 | 3.62 MB | 1 年前3
OpenShift Container Platform 4.10 CLI 工具auth plugin environment variables for the "cluster-admin" entry oc config set-credentials cluster-admin --exec-env=key1=val1 --exec-env=key2=val2 # Remove exec auth plugin environment variables for directory oc kustomize # Build some shared configuration directory oc kustomize /home/config/production # Build from github oc kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld centos:7\nRUN yum install -y httpd' # Create a build config from a remote repository and add custom environment variables oc new-build https://github.com/openshift/ruby-hello-world -e RACK_ENV=development0 码力 | 120 页 | 1.04 MB | 1 年前3
OpenShift Container Platform 4.13 CLI 工具auth plugin environment variables for the "cluster-admin" entry oc config set-credentials cluster-admin --exec-env=key1=val1 --exec-env=key2=val2 # Remove exec auth plugin environment variables for directory oc kustomize # Build some shared configuration directory oc kustomize /home/config/production # Build from github oc kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld centos:7\nRUN yum install -y httpd' # Create a build config from a remote repository and add custom environment variables oc new-build https://github.com/openshift/ruby-hello-world -e RACK_ENV=development0 码力 | 128 页 | 1.11 MB | 1 年前3
OpenShift Container Platform 4.8 CLI 工具auth plugin environment variables for the "cluster-admin" entry oc config set-credentials cluster-admin --exec-env=key1=val1 --exec-env=key2=val2 # Remove exec auth plugin environment variables for 结束当前服务器会话 用法示例 用法示例 # Build some shared configuration directory oc kustomize /home/config/production # Build from github oc kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld centos:7\nRUN yum install -y httpd' # Create a build config from a remote repository and add custom environment variables oc new-build https://github.com/openshift/ruby-hello-world -e RACK_ENV=development0 码力 | 152 页 | 1.24 MB | 1 年前3
OpenShift Container Platform 4.4 构建(build)体文件能够使用 BuildConfig 中定义的 环境变量来自定义,而不必更新 Dockerfile 或 assemble 脚本。 您可以选择不同方法来定义环境变量: 使用 .s2i/environment 文件(仅适用于 Source 构建策略) 在 BuildConfig 中设置 使用 oc start-build --env 明确提供(仅适用于手动触发的构建) 3.8. 将 DOCKER 的 .s2i/environment 文件中指定它们。此文件中指定的环境变量存在于构建过程和输出镜像。 如果在源存储库中提供 .s2i/environment 文件,则 S2I 会在构建期间读取此文件。这允许自定义构建行 为,因为 assembe 脚本可能会使用这些变量。 流程 流程 例如,在构建期间禁用 Rails 应用程序的资产编译: 在 .s2i/environment 文件中添加 DISABLE_ASSET_COMPILATION=true。 除了构建之外,指定的环境变量也可以在运行的应用程序本身中使用。例如,使 Rails 应用程序在 development 模式而非 production 模式中启动: 在 .s2i/environment 文件中添加 RAILS_ENV=development。 其他 其他资 资源 源 使用镜像部分中提供了各个镜像支持的环境变量的完整列表。 5.2.3.2. 使用0 码力 | 101 页 | 1.12 MB | 1 年前3
OpenShift Container Platform 4.13 CI/CD体文件能够使用 BuildConfig 中定义的 环境变量来自定义,而不必更新 Dockerfile 或 assemble 脚本。 您可以选择不同方法来定义环境变量: 使用 .s2i/environment 文件(仅适用于 Source 构建策略) 在 BuildConfig 中设置 使用 oc start-build --env 明确提供(仅适用于手动触发的构建) 2.3.8. 将 docker Source-to-image 环 环境文件 境文件 利用源代码构建,您可以在应用程序内设置环境值(每行一个),方法是在源存储库中的 .s2i/environment 文件中指定它们。此文件中指定的环境变量存在于构建过程和输出镜像。 如果您在源存储库中提供 .s2i/environment 文件,则 source-to-image(S2I)会在构建期间读取此文件。 这允许自定义构建行为,因为 assembe 脚本可能会使用这些变量。 Rails 应用程序的资产编译: 在 .s2i/environment 文件中添加 DISABLE_ASSET_COMPILATION=true。 除了构建之外,指定的环境变量也可以在运行的应用程序本身中使用。例如,使 Rails 应用程序在 development 模式而非 production 模式中启动: 在 .s2i/environment 文件中添加 RAILS_ENV=development。0 码力 | 129 页 | 1.37 MB | 1 年前3
OpenShift Container Platform 4.13 网络您可以使用具有 admin 权限的用户登陆到集群。 您在网络策略要应用到的命名空间中。 流程 流程 1. 创建一个策略,允许来自特定命名空间中所有 pod 的流量,其标签为 purpose=production。将 YAML 保存到 web-allow-prod.yaml 文件中: working. Further configuration is required.For online Container Platform 4.13 网 网络 络 218 1 2 仅将策略应用到 default 命名空间中的 app:web pod。 将流量仅限制为具有标签 purpose=production 的命名空间中的 pod。 2. 输入以下命令应用策略: 输 输出示例 出示例 验证 验证 1. 输入以下命令在 default 命名空间中启动 web 服务: 2. 运行以下命令来创建 中运行以下命令,并观察请求是否被阻止: 预 预期 期输 输出 出 - namespaceSelector: matchLabels: purpose: production 2 $ oc apply -f web-allow-prod.yaml networkpolicy.networking.k8s.io/web-allow-prod created $
0 码力 | 697 页 | 7.55 MB | 1 年前3
OpenShift Container Platform 4.6 分布式追踪Collector。Collector spec: mode: deployment config: | exporters: jaeger: endpoint: jaeger-production-collector-headless.tracing-system.svc:14250 ca_file: "/var/run/secrets/kubernetes.io/s crt" spec: mode: deployment config: | exporters: jaeger: endpoint: jaeger-production-collector-headless.tracing-system.svc:14250 tls: ca_file: "/var/run/secrets/kubernetes apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: MyConfigFile spec: strategy: production 1 第 第 3 章 章 分布式追踪安装 分布式追踪安装 17 allInOne (默认)- 这个策略主要用于开发、测试和演示目的,它不用于生产环境。主要的 后端组件 Agent、Collector0 码力 | 59 页 | 572.03 KB | 1 年前3
OpenShift Container Platform 4.14 分布式追踪服务上成功公开。 (TRACING-3322) 在此次更新之前,为 jaeger-production-query 公开的端口是错误的,并导致连接被拒绝。在这 OpenShift Container Platform 4.14 分布式追踪 分布式追踪 12 在此次更新之前,为 jaeger-production-query 公开的端口是错误的,并导致连接被拒绝。在这 个版本中,这个问题已通过在 文件配置 spec: mode: deployment config: | exporters: jaeger: endpoint: jaeger-production-collector-headless.tracing-system.svc:14250 ca_file: "/var/run/secrets/kubernetes.io/s 执行根原因分析 spec: mode: deployment config: | exporters: jaeger: endpoint: jaeger-production-collector-headless.tracing-system.svc:14250 tls: ca_file: "/var/run/secrets/kubernetes0 码力 | 100 页 | 928.24 KB | 1 年前3
OpenShift Container Platform 4.8 Service Mesh默认启用分布式追踪。 为 Service Mesh 默认启用 ingress 。 Zipkin 端口名称已改为 jaeger-collector-zipkin(从 http) 当选择 production 或 streaming 部署选项时,Jaeger 会默认使用 Elasticsearch 作为存储。 Istio 的社区版本提供了一个通用的 “tracing” 路由。Red Hat OpenShift name: jaeger install: storage: type: Memory # or Elasticsearch for production mode memory: maxTraces: 100000 elasticsearch: # the following values 将分布式追踪平台实例的名称添加到 ServiceMeshControlPlane 资源中的 spec.addons.jaeger.name 中。在以下示例中,distr-tracing-production 是分布式追踪平 台实例的名称。 分布式追踪配置示例 分布式追踪配置示例 c. 点击 Save。 5. 点 Reload 来验证 ServiceMeshControlPlane 资源已被正确配置。0 码力 | 344 页 | 3.04 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













