Skip to content

Conversation

@colinnewell
Copy link

If we have a volume defined like this in our docker-compose,

volumes:
  - ./cache:/var/cache/nginx

The name .cache is generated for the volume which failes the k8s
name specification.

Error from server: error when creating "output/nginx-rc.yml":
ReplicationController "nginx" is invalid:
[spec.template.spec.volumes[0].name: Invalid value: ".cache": must match
the regex [a-z0-9]([-a-z0-9]*[a-z0-9])? (e.g. 'my-name' or '123-abc'),
spec.template.spec.containers[0].volumeMounts[0].name: Not found:
".cache"]

If we have a volume defined like this in our docker-compose,

    volumes:
      - ./cache:/var/cache/nginx

The name .cache is generated for the volume which failes the k8s
name specification.

    Error from server: error when creating "output/nginx-rc.yml":
    ReplicationController "nginx" is invalid:
    [spec.template.spec.volumes[0].name: Invalid value: ".cache": must match
    the regex [a-z0-9]([-a-z0-9]*[a-z0-9])? (e.g. 'my-name' or '123-abc'),
    spec.template.spec.containers[0].volumeMounts[0].name: Not found:
    ".cache"]
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

Successfully merging this pull request may close these issues.

1 participant