<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete(self, name, provider='AwsEKS'):
 """Delete a Kubernetes cluster. """

        # if self.check_cluster_exists(name) is False:
        #     raise JhubctlError("Cluster name not found in availabe clusters.")

        # Create cluster object
        Cluster = getattr(providers, provider)
        cluster = Cluster(name)
        cluster.delete()

        # Remove from kubeconf
        self.kubeconf.open()
        self.kubeconf.remove_context(name)
        self.kubeconf.remove_user(name)
        self.kubeconf.remove_cluster(cluster.cluster_name)
        self.kubeconf.close()