diff --git a/tcp_tests/fixtures/k8s_fixtures.py b/tcp_tests/fixtures/k8s_fixtures.py
new file mode 100644
index 0000000..bec38a5
--- /dev/null
+++ b/tcp_tests/fixtures/k8s_fixtures.py
@@ -0,0 +1,75 @@
+#    Copyright 2017 Mirantis, Inc.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import pytest
+
+from tcp_tests.helpers import ext
+from tcp_tests import logger
+from tcp_tests.managers import k8smanager
+
+LOG = logger.logger
+
+
+@pytest.fixture(scope='function')
+def k8s_actions(config, underlay, salt_deployed):
+    """Fixture that provides various actions for K8S
+
+    :param config: fixture provides oslo.config
+    :param underlay: fixture provides underlay manager
+    :param salt_deployed: fixture provides salt manager
+    :rtype: K8SManager
+
+    For use in tests or fixtures to deploy a custom K8S
+    """
+    return k8smanager.K8SManager(config, underlay, salt_deployed)
+
+
+@pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
+@pytest.fixture(scope='function')
+def k8s_deployed(revert_snapshot, request, config, hardware, underlay,
+                 common_services_deployed, k8s_actions):
+    """Fixture to get or install k8s on environment
+
+    :param revert_snapshot: fixture that reverts snapshot that is specified
+                            in test with @pytest.mark.revert_snapshot(<name>)
+    :param request: fixture provides pytest data
+    :param config: fixture provides oslo.config
+    :param hardware: fixture provides enviromnet manager
+    :param underlay: fixture provides underlay manager
+    :param common_services_deployed: fixture provides CommonServicesManager
+    :param k8s_actions: fixture provides K8SManager instance
+    :rtype: K8SManager
+
+    If config.k8s.k8s_installed is not set, this fixture assumes
+    that the k8s services were not installed, and do the following:
+    - install k8s services
+    - make snapshot with name 'k8s_deployed'
+    - return K8SManager instance
+
+    If config.k8s.k8s_installed was set, this fixture assumes that
+    the k8s services were already installed, and do the following:
+    - return K8SManager instance
+
+    If you want to revert 'k8s_deployed' snapshot, please use mark:
+    @pytest.mark.revert_snapshot("k8s_deployed")
+    """
+
+    # Deploy Kubernetes cluster
+    if not config.k8s.k8s_installed:
+        steps_path = config.k8s_deploy.k8s_steps_path
+        commands = underlay.read_template(steps_path)
+        k8s_actions.install(commands)
+        hardware.create_snapshot(ext.SNAPSHOT.k8s_deployed)
+
+    return k8s_actions
\ No newline at end of file
diff --git a/tcp_tests/fixtures/openstack_fixtures.py b/tcp_tests/fixtures/openstack_fixtures.py
index f69c247..ae3b9e8 100644
--- a/tcp_tests/fixtures/openstack_fixtures.py
+++ b/tcp_tests/fixtures/openstack_fixtures.py
@@ -28,13 +28,14 @@
 
 @pytest.fixture(scope='function')
 def openstack_actions(config, underlay, salt_deployed):
-    """Fixture that provides various actions for K8S
+    """Fixture that provides various actions for OpenStack
 
     :param config: fixture provides oslo.config
     :param underlay: fixture provides underlay manager
-    :rtype: K8SManager
+    :param salt_deployed: fixture provides salt manager
+    :rtype: OpenstackManager
 
-    For use in tests or fixtures to deploy a custom K8S
+    For use in tests or fixtures to deploy a custom OpenStack
     """
     return openstack_manager.OpenstackManager(config, underlay, salt_deployed)
 
@@ -52,7 +53,8 @@
     :param config: fixture provides oslo.config
     :param hardware: fixture provides enviromnet manager
     :param underlay: fixture provides underlay manager
-    :param tcp_actions: fixture provides OpenstackManager instance
+    :param common_services_deployed: fixture provides CommonServicesManager
+    :param openstack_actions: fixture provides OpenstackManager instance
     :rtype: OpenstackManager
 
     If config.openstack.openstack_installed is not set, this fixture assumes
@@ -68,54 +70,7 @@
     If you want to revert 'openstack_deployed' snapshot, please use mark:
     @pytest.mark.revert_snapshot("openstack_deployed")
     """
-    # Create Salt cluster
-    if not config.openstack.openstack_installed:
-        steps_path = config.openstack_deploy.openstack_steps_path
-        commands = underlay.read_template(steps_path)
-        openstack_actions.install(commands)
-        hardware.create_snapshot(ext.SNAPSHOT.openstack_deployed)
-
-    else:
-        # 1. hardware environment created and powered on
-        # 2. config.underlay.ssh contains SSH access to provisioned nodes
-        #    (can be passed from external config with TESTS_CONFIGS variable)
-        # 3. config.tcp.* options contain access credentials to the already
-        #    installed TCP API endpoint
-        pass
-
-    return openstack_actions
-
-
-@pytest.mark.revert_snapshot(ext.SNAPSHOT.openstack_deployed)
-@pytest.fixture(scope='function')
-def deploy_openstack(revert_snapshot, request, config,
-                     hardware, underlay, common_services_deployed,
-                     openstack_actions):
-    """Fixture to get or install OpenStack services on environment
-
-    :param revert_snapshot: fixture that reverts snapshot that is specified
-                            in test with @pytest.mark.revert_snapshot(<name>)
-    :param request: fixture provides pytest data
-    :param config: fixture provides oslo.config
-    :param hardware: fixture provides enviromnet manager
-    :param underlay: fixture provides underlay manager
-    :param tcp_actions: fixture provides OpenstackManager instance
-    :rtype: OpenstackManager
-
-    If config.openstack.openstack_installed is not set, this fixture assumes
-    that the openstack services were not installed, and do the following:
-    - install openstack services
-    - make snapshot with name 'openstack_deployed'
-    - return OpenstackManager instance
-
-    If config.openstack.openstack_installed was set, this fixture assumes that
-    the openstack services were already installed, and do the following:
-    - return OpenstackManager instance
-
-    If you want to revert 'openstack_deployed' snapshot, please use mark:
-    @pytest.mark.revert_snapshot("openstack_deployed")
-    """
-    # Create Salt cluster
+    # Deploy Openstack cluster
     if not config.openstack.openstack_installed:
         steps_path = config.openstack_deploy.openstack_steps_path
         commands = underlay.read_template(steps_path)
diff --git a/tcp_tests/fixtures/virtlet_ceph_fixtures.py b/tcp_tests/fixtures/virtlet_ceph_fixtures.py
index 9a13cb4..a9cd3db 100644
--- a/tcp_tests/fixtures/virtlet_ceph_fixtures.py
+++ b/tcp_tests/fixtures/virtlet_ceph_fixtures.py
@@ -12,40 +12,34 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import os
-
 import pytest
-import yaml
 
 from tcp_tests import logger
 from tcp_tests.helpers import ext
-from tcp_tests import settings
 from tcp_tests.managers import virtlet_ceph_manager
 
 LOG = logger.logger
 
 
 @pytest.fixture(scope='function')
-def virtlet_ceph_actions(config, underlay, salt_actions):
+def virtlet_ceph_actions(config, underlay):
     """Fixture that provides various actions for Virtlet project
 
     :param config: fixture provides oslo.config
     :param underlay: fixture provides underlay manager
     :rtype: VirtletCephManager
     """
-    return virtlet_ceph_manager.VirtletCephManager(config, underlay, salt_actions)
+    return virtlet_ceph_manager.VirtletCephManager(config, underlay)
 
 
 @pytest.mark.revert_snapshot(ext.SNAPSHOT.virtlet_ceph_deployed)
 @pytest.fixture(scope='function')
-def virtlet_ceph_deployed(revert_snapshot, request, config,
-                          hardware, underlay, common_services_deployed,
+def virtlet_ceph_deployed(revert_snapshot, config, hardware, underlay,
                           virtlet_deployed, virtlet_ceph_actions):
     """Fixture to get or install Virtlet project on the environment
 
     :param revert_snapshot: fixture that reverts snapshot that is specified
                             in test with @pytest.mark.revert_snapshot(<name>)
-    :param request: fixture provides pytest data
     :param config: fixture provides oslo.config
     :param hardware: fixture provides enviromnet manager
     :param underlay: fixture provides underlay manager
@@ -67,7 +61,7 @@
     If you want to revert 'virtlet_ceph_deployed' snapshot, please use mark:
     @pytest.mark.revert_snapshot("virtlet_ceph_deployed")
     """
-    # Create Salt cluster
+    # Deploy Virtlet with Ceph for Kubernetes
     if not config.virtlet.ceph_installed:
         steps_path = config.virtlet_deploy.virtlet_ceph_steps_path
         commands = underlay.read_template(steps_path)
diff --git a/tcp_tests/fixtures/virtlet_fixtures.py b/tcp_tests/fixtures/virtlet_fixtures.py
index f70a201..301800e 100644
--- a/tcp_tests/fixtures/virtlet_fixtures.py
+++ b/tcp_tests/fixtures/virtlet_fixtures.py
@@ -12,43 +12,38 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import os
-
 import pytest
-import yaml
 
 from tcp_tests import logger
 from tcp_tests.helpers import ext
-from tcp_tests import settings
 from tcp_tests.managers import virtlet_manager
 
 LOG = logger.logger
 
 
 @pytest.fixture(scope='function')
-def virtlet_actions(config, underlay, salt_actions):
+def virtlet_actions(config, underlay):
     """Fixture that provides various actions for Virtlet project
 
     :param config: fixture provides oslo.config
     :param underlay: fixture provides underlay manager
     :rtype: VirtletManager
     """
-    return virtlet_manager.VirtletManager(config, underlay, salt_actions)
+    return virtlet_manager.VirtletManager(config, underlay)
 
 
 @pytest.mark.revert_snapshot(ext.SNAPSHOT.virtlet_deployed)
 @pytest.fixture(scope='function')
-def virtlet_deployed(revert_snapshot, request, config,
-                             hardware, underlay, common_services_deployed,
-                             virtlet_actions):
+def virtlet_deployed(revert_snapshot, config, hardware, underlay,
+                     k8s_deployed, virtlet_actions):
     """Fixture to get or install Virtlet project on the environment
 
     :param revert_snapshot: fixture that reverts snapshot that is specified
                             in test with @pytest.mark.revert_snapshot(<name>)
-    :param request: fixture provides pytest data
     :param config: fixture provides oslo.config
     :param hardware: fixture provides enviromnet manager
     :param underlay: fixture provides underlay manager
+    :param k8s_deployed: fixture provides K8SManager instance
     :param virtlet_actions: fixture provides VirtletManager instance
     :rtype: VirtletManager
 
@@ -66,7 +61,7 @@
     If you want to revert 'virtlet_deployed' snapshot, please use mark:
     @pytest.mark.revert_snapshot("virtlet_deployed")
     """
-    # Create Salt cluster
+    # Deploy Virtlet for Kubernetes
     if not config.virtlet.virtlet_installed:
         steps_path = config.virtlet_deploy.virtlet_steps_path
         commands = underlay.read_template(steps_path)
