Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use port name rather than port number for identifiers #4

Open
felipecrs opened this issue Nov 11, 2022 · 0 comments
Open

Allow to use port name rather than port number for identifiers #4

felipecrs opened this issue Nov 11, 2022 · 0 comments

Comments

@felipecrs
Copy link

Like:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dynamic-hostport-example
spec:
  replicas: 5
  selector:
    matchLabels:
      app: dynamic-hostport-example-deployment
  template:
    metadata:
      annotations:
-       #dynamic-hostports.k8s/8080: 'DO NOT SET'
+       #dynamic-hostports.k8s/http: 'DO NOT SET'
      labels:
        app: dynamic-hostport-example-deployment
        # This is where the magic happens
-       dynamic-hostports: '8080' # Must be a string. Split multiple ports with '.'
+       dynamic-hostports: 'http' # Must be a string with port names or numbers. Split multiple ports with '.'
    spec:
      containers:
      - name: dynamic-hostport-example1-container
        image: paulbouwer/hello-kubernetes:1.8
        env:
          - name: MESSAGE
            value: Hello from port 8080
          #- name: PORT
          #  value: '8080' # 8080 Is standard port of paulbouwer/hello-kubernete
        ports:
        - containerPort: 8080
+         name: http
          #hostPort: DO NOT SET THIS HERE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant