We study the relationship between two major baryonic components in galaxy clusters, namely the stars in galaxies, and the ionized gas in the intracluster medium (ICM), using 94 clusters that span the redshift range 0-0.6. Accurately measured total and ICM masses from Chandra observations, and stellar masses derived from the Wide-field Infrared Survey Explorer and the Two-Micron All-Sky Survey allow us to trace the evolution of cluster baryon content in a self-consistent fashion. We find that, within r_{500}, the evolution of the ICM mass--total mass relation is consistent with the expectation of self-similar model, while there is no evidence for redshift evolution in the stellar mass--total mass relation. This suggests that the stellar mass and ICM mass in the inner parts of clusters evolve differently.