-
Notifications
You must be signed in to change notification settings - Fork 745
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
Docs: Labels should be elaborated more #1576
Comments
We'll have to showcase and document each label and what it does (and the corresponding kubernetes yaml that it outputs too) |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
kompose.service.type
In this example services:
nginx:
image: nginx
build:
context: ./foobar
dockerfile: foobar
cap_add:
- ALL
container_name: foobar
ports:
- 8080:80
labels:
kompose.service.type: nodeport Converted docker compose file exposes the service on a static port on each worker node. ---
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: nginx
name: nginx
spec:
ports:
- name: "8080"
port: 8080
targetPort: 80
selector:
io.kompose.service: nginx
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: nginx
name: nginx
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: nginx
template:
metadata:
labels:
io.kompose.network/kompose-default: "true"
io.kompose.service: nginx
spec:
containers:
- image: nginx
name: foobar
ports:
- containerPort: 80
hostPort: 8080
protocol: TCP
securityContext:
capabilities:
add:
- ALL
restartPolicy: Always kompose.service.nodeport.port
services:
nginx:
image: nginx
ports:
- 9090:80
labels:
kompose.service.nodeport.port: 9090
kompose.service.type: nodeport converted: ---
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: nginx
name: nginx
spec:
ports:
- name: "9090"
nodePort: 9090
port: 9090
targetPort: 80
selector:
io.kompose.service: nginx
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: nginx
name: nginx
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: nginx
template:
metadata:
labels:
io.kompose.network/kompose-default: "true"
io.kompose.service: nginx
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
hostPort: 9090
protocol: TCP
restartPolicy: Always kompose.service.expose
For the Kubernetes provider, an ingress resource is created, and it is assumed that an ingress controller has already been configured. If the value is set to a comma-separated list, multiple hostnames are supported. Hostname with the path is also supported. For the OpenShift provider, a route is created. In this example Docker compose file: version: "2"
services:
web:
image: tuna/docker-counter23
ports:
- "5000:5000"
links:
- redis
labels:
kompose.service.expose: "counter.example.com,foobar.example.com"
redis:
image: redis:3.0
ports:
- "6379" converted to kubernetes deployment, service, ingress: ---
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: redis
name: redis
spec:
ports:
- name: "6379"
port: 6379
targetPort: 6379
selector:
io.kompose.service: redis
---
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: web
name: web
spec:
ports:
- name: "5000"
port: 5000
targetPort: 5000
selector:
io.kompose.service: web
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: redis
name: redis
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: redis
template:
metadata:
labels:
io.kompose.network/kompose-default: "true"
io.kompose.service: redis
spec:
containers:
- image: redis:3.0
name: redis
ports:
- containerPort: 6379
protocol: TCP
restartPolicy: Always
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: web
name: web
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: web
template:
metadata:
labels:
io.kompose.network/kompose-default: "true"
io.kompose.service: web
spec:
containers:
- image: tuna/docker-counter23
name: web
ports:
- containerPort: 5000
hostPort: 5000
protocol: TCP
restartPolicy: Always
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
io.kompose.service: web
name: web
spec:
rules:
- host: counter.example.com
http:
paths:
- backend:
service:
name: web
port:
number: 5000
path: /
pathType: Prefix
- host: foobar.example.com
http:
paths:
- backend:
service:
name: web
port:
number: 5000
path: /
pathType: Prefix |
I am stuck using "fake" filtering, due to missing service labels kubectl -n my-namespace logs -f -l io.kompose.service!=nonexistent Is there a way to specify docker compose service labels to be available under kubernetes service labels?
|
The page here: https://kompose.io/user-guide/#labels
The label is confusing to read and process.
We should have a section (header 3 /
###
) for EACH label explaining it with an example.The text was updated successfully, but these errors were encountered: