Migration: Steps needed between the versions

v2.0 to v2.1

In v2.1, a new CRD called TraefikService was added. While updating an installation to v2.1,it is required to apply that CRD before as well as enhance the existing ClusterRole definition to allow Traefik to use that CRD.

To add that CRD and enhance the permissions, following definitions need to be applied to the cluster.

  1. apiVersion: apiextensions.k8s.io/v1beta1
  2. kind: CustomResourceDefinition
  3. metadata:
  4. name: traefikservices.traefik.containo.us
  5. spec:
  6. group: traefik.containo.us
  7. version: v1alpha1
  8. names:
  9. kind: TraefikService
  10. plural: traefikservices
  11. singular: traefikservice
  12. scope: Namespaced

  1. kind: ClusterRole
  2. apiVersion: rbac.authorization.k8s.io/v1beta1
  3. metadata:
  4. name: traefik-ingress-controller
  5. rules:
  6. - apiGroups:
  7. - ""
  8. resources:
  9. - services
  10. - endpoints
  11. - secrets
  12. verbs:
  13. - get
  14. - list
  15. - watch
  16. - apiGroups:
  17. - extensions
  18. resources:
  19. - ingresses
  20. verbs:
  21. - get
  22. - list
  23. - watch
  24. - apiGroups:
  25. - extensions
  26. resources:
  27. - ingresses/status
  28. verbs:
  29. - update
  30. - apiGroups:
  31. - traefik.containo.us
  32. resources:
  33. - middlewares
  34. verbs:
  35. - get
  36. - list
  37. - watch
  38. - apiGroups:
  39. - traefik.containo.us
  40. resources:
  41. - ingressroutes
  42. verbs:
  43. - get
  44. - list
  45. - watch
  46. - apiGroups:
  47. - traefik.containo.us
  48. resources:
  49. - ingressroutetcps
  50. verbs:
  51. - get
  52. - list
  53. - watch
  54. - apiGroups:
  55. - traefik.containo.us
  56. resources:
  57. - tlsoptions
  58. verbs:
  59. - get
  60. - list
  61. - watch
  62. - apiGroups:
  63. - traefik.containo.us
  64. resources:
  65. - traefikservices
  66. verbs:
  67. - get
  68. - list
  69. - watch

After having both resources applied, Traefik will work properly.