def set_current_context(self, name):
        """Set the current context in kubeconfig."""
        if self.context_exists(name):
            self.data['current-context'] = name
        else:
            raise KubeConfError("Context does not exist.")