For a complete graph with an even number of vertices, this amounts to finding a 1-factorisation, such as the following:

A general construction is formed by rotating a "starter", such as the following:
K_{18}">
Each rotation describes where to place the edges of a single colour. Picture source:
Mendelsohn and Rosa, One-factorizations of the complete graph—A survey, Journal of Graph Theory 9 (1985) 43–65. (link)
See also the above reference for further details on how to construct 1-factorisations of $K_{2n}$ and near 1-factorisations of $K_{2n-1}$. Hence
Observation: The edge-chromatic number of $K_{2n}$ is $2n-1$ (its maximum degree) for $n \geq 1$.
For $K_{2n-1}$, we simply start with a 1-factorisation of $K_{2n}$ and delete a vertex, which results in $2n-1$ distinct edge colours. This is the best possible, since each edge colour can occur at most $n-1$ times (without having adjacent monochromatic edges), so we need at least $\frac{{2n-1} \choose 2}{n-1}=2n-1$ colours.
Observation: The edge-chromatic number of $K_{2n-1}$ is $2n-1$ for $n \geq 2$.