def get_by_name(config=None, name=None, name_label='name'):
        """
        Fetches a K8sDeployment by name.
        
        :param config: A K8sConfig object.
        :param name: The name we want.
        :param name_label: The label key to use for name.
        :return: A list of K8sDeployment objects.
        """

        if name is None:
            raise SyntaxError(
                'Deployment: name: [ {0} ] cannot be None.'.format(name))
        if not isinstance(name, str):
            raise SyntaxError(
                'Deployment: name: [ {0} ] must be a string.'.format(name))

        if config is not None and not isinstance(config, K8sConfig):
            raise SyntaxError(
                'Deployment: config: [ {0} ] must be a K8sConfig'.format(config))

        deps = K8sDeployment(config=config, name=name).list(labels={
            name_label: name
        })

        return deps