Giter Club home page Giter Club logo

Comments (4)

nmengin avatar nmengin commented on May 24, 2024

Hey @nelsonstar,

Thanks for reaching out.

Could you provide a minimal reproducible case (for instance, full logs and static configuration)?
In the meantime, if any community member can help us find verified steps to reproduce and fix the issue if possible, we would love the help.

from traefik.

nelsonstar avatar nelsonstar commented on May 24, 2024
apiVersion: v1
kind: Namespace
metadata:
  name: zone2
---
apiVersion: v1
kind: Namespace
metadata:
  name: zone1
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  namespace: zone1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.24.0
        ports:
        - containerPort: 80
        command: ["nginx", "-g", "daemon off;"]
        volumeMounts:
        - name: nginx-config
          mountPath: /etc/nginx/sites-available/default  # Updated mount path
          subPath: default
      volumes:
      - name: nginx-config
        configMap:
          name: nginx-configmap
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-configmap
  namespace: zone1
data:
  default: |
    server {
      listen 80;
      server_name localhost;
      location / {
        default_type text/plain;
        return 200 "This is Service A";
      }
    }
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  namespace: zone2
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.24.0
        command: ["nginx", "-g", "daemon off;"]
        ports:
        - containerPort: 80
        volumeMounts:
        - name: nginx-config
          mountPath: /etc/nginx/sites-available/default   # Updated mount path
          subPath: default
      volumes:
      - name: nginx-config
        configMap:
          name: nginx-configmap
---
apiVersion: v1
kind: Service
metadata:
  name: nginx-service
  namespace: zone1
spec:
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
  type: ClusterIP
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-configmap
  namespace: zone2
data:
  default: |
    server {
      listen 80;
      server_name localhost;

      location / {
        default_type text/plain;
        return 200 "This is Service B";
      }
    }
---
apiVersion: v1
kind: Service
metadata:
  name: nginx-service
  namespace: zone2
spec:
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
  type: ClusterIP

from traefik.

nelsonstar avatar nelsonstar commented on May 24, 2024

Has there been any progress on this issue?

from traefik.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.