diff --git a/tcp_tests/managers/k8s/limitranges.py b/tcp_tests/managers/k8s/limitranges.py
index 7136300..3a9b2de 100644
--- a/tcp_tests/managers/k8s/limitranges.py
+++ b/tcp_tests/managers/k8s/limitranges.py
@@ -12,52 +12,45 @@
 #    License for the specific language governing permissions and limitations
 
 
+from kubernetes import client
+
 from tcp_tests.managers.k8s.base import K8sBaseResource
 from tcp_tests.managers.k8s.base import K8sBaseManager
 
 
 class K8sLimitRange(K8sBaseResource):
-    """docstring for K8sLimitRange"""
+    resource_type = 'limitrange'
 
-    def __repr__(self):
-        return "<K8sLimitRange: %s>" % self.name
+    def _read(self, **kwargs):
+        return self._manager.api.read_namespaced_limit_range(
+            self.name, self.namespace, **kwargs)
 
-    @property
-    def name(self):
-        return self.metadata.name
+    def _create(self, body, **kwargs):
+        return self._manager.api.create_namespaced_limit_range(
+            self.namespace, body, **kwargs)
+
+    def _patch(self, body, **kwargs):
+        return self._manager.api.patch_namespaced_limit_range(
+            self.name, self.namespace, body, **kwargs)
+
+    def _replace(self, body, **kwargs):
+        return self._manager.api.replace_namespaced_limit_range(
+            self.name, self.namespace, body, **kwargs)
+
+    def _delete(self, **kwargs):
+        self._manager.api.delete_namespaced_limit_range(
+            self.name, self.namespace, client.V1DeleteOptions(), **kwargs)
 
 
 class K8sLimitRangeManager(K8sBaseManager):
-    """docstring for ClassName"""
-
     resource_class = K8sLimitRange
 
-    def _get(self, name, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.read_namespaced_limit_range(
-            name=name, namespace=namespace, **kwargs)
+    @property
+    def api(self):
+        return self._cluster.api_core
 
-    def _list(self, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.list_namespaced_limit_range(
-            namespace=namespace, **kwargs)
+    def _list(self, namespace, **kwargs):
+        return self.api.list_namespaced_limit_range(namespace, **kwargs)
 
-    def _create(self, body, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.create_namespaced_limit_range(
-            body=body, namespace=namespace, **kwargs)
-
-    def _replace(self, body, name, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.replace_namespaced_limit_range(
-            body=body, name=name, namespace=namespace, **kwargs)
-
-    def _delete(self, body, name, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.delete_namespaced_limit_range(
-            body=body, name=name, namespace=namespace, **kwargs)
-
-    def _deletecollection(self, namespace=None, **kwargs):
-        namespace = namespace or self.namespace
-        return self.api.deletecollection_namespaced_limit_range(
-            namespace=namespace, **kwargs)
+    def _list_all(self, **kwargs):
+        return self.api.list_limit_range_for_all_namespaces(**kwargs)
