English 中文(简体)
具有相同形象的集装箱,但具有不同的组合
原标题:Containers with the same image version but with different configs

是否有办法使用2个具有相同形象的集装箱,但开放式飞机上的名称和资源不同?

例如: 在同一个名称空间,鉴于有复制件的微型服务:6,有美籍名称的“申请银行”,我想有3个标语,名称为“申请银行-aa-<pod_hash>”和其他3个标语,名称为“app-banking-bbb<pod_hash>及 envs VXZ。

Didnt在互联网上发现任何类似情况。

由于我们有两个Kafka Bootss-servers,我们有一些消费者服务,我们正试图在同一个名称空间实施“交叉经纪”解决办法。

因此,有3个护堤将连接诱杀装置Server1和其他3个护堤,用于诱杀装置Server2。

给予帮助。

问题回答

When you deploy an application on OpenShift/Kubernetes, you need to create Deployments*1 resource on the cluster.

Deployments is one of the resources in Kubernetes and helps you to manage your application (Pod). Deployments have fields to specify a container image url and environment variables. So that it is easy to deploy applications using same container images but using different environment variables. Here is an example.

1. 引诱-aaa-<pod_hash>

apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-banking-aaa
  labels:
    app: app-banking-aaa
spec:
  replicas: 3
  selector:
    matchLabels:
      app: app-banking-aaa
  template:
    metadata:
      labels:
        app: app-banking-aaa
    spec:
      containers:
      - name: app-banking
        image: https://path-to-your-registry/your-app:tag1
        env:
        - name: ABC
          value: abc

申请表-银行-bbb-<pod_hash>

apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-banking-bbb
  labels:
    app: app-banking-bbb
spec:
  replicas: 3
  selector:
    matchLabels:
      app: app-banking-bbb
  template:
    metadata:
      labels:
        app: app-banking-bbb
    spec:
      containers:
      - name: app-banking
        image: https://path-to-your-registry/your-app:tag1
        env:
        - name: VXZ
          value: vxz

然而,你们许多人需要在部署方面增加更多的领域,上述部署有助于你们了解需要做些什么。

我认为,你还需要寻找特惠制和秘密资源,以确定部署中的环境变量。

*1:https://kubernetes.io/docs/concepts/workloads/ Controllers/dplo/





相关问题
Silverlight: Add same UserControl to more than one Canvas

I have a bunch of UserControls ( MyUserControl ) that I want to have a user manually add to one or more Canvases. One instance of a UserControl cannot be a child element of more than one container (...

c++ templated container scanner

here s today s dilemma: suppose I ve class A{ public: virtual void doit() = 0; } then various subclasses of A, all implementing their good doit method. Now suppose I want to write a function ...

Multi-Dimensional Container in Java

I searched around on Google, but I was unable to find any libraries for a multi-dimensional container in Java (preferably one that supports generics as well). I could easily write one (in fact, I ...

c# stack queue combination

is there in C# some already defined generic container which can be used as Stack and as Queue at the same time? I just want to be able to append elements either to the end, or to the front of the ...

Custom container requirement to work with Qt s foreach

What is the bare minimum amount of code to create a custom container that would work with Qt foreach macro? I have this so far template< class T > class MyList { public: class iterator { ...

Having many stacks with different types

I m making a C program that needs to use two stacks. One needs to hold chars, the other needs to hold doubles. I have two structs, node and stack: struct node { double value; struct node *...

热门标签