diff --git a/xos/synchronizer/models/kubernetes.xproto b/xos/synchronizer/models/kubernetes.xproto
index 405f1c2..06aae56 100644
--- a/xos/synchronizer/models/kubernetes.xproto
+++ b/xos/synchronizer/models/kubernetes.xproto
@@ -6,6 +6,14 @@
 
 }
 
+message KubernetesResourceInstance (XOSBase){
+     option verbose_name = "Kubernetes Resource Instance";
+     required string name = 1 [db_index = True, max_length = 200, content_type = "stripped", tosca_key=True, unique=True, help_text = "Name of ResourceInstance"];
+     required manytoone owner->Service:kubernetes_resource_instances = 2 [db_index = True, null = False, blank = False];
+     optional string resource_definition = 3 [help_text = "yaml blob"];
+     optional string kubectl_state = 4 [max_length=32, db_index = False, choices = "(('created', 'CREATED'), ('updated', 'UPDATED'), ('deleted', 'DELETED'))", help_text = "Most recent state of kubectl"];
+}
+
 message KubernetesServiceInstance (ComputeServiceInstance){
      option verbose_name = "Kubernetes Service Instance";
      optional string pod_ip = 1 [max_length=32, db_index = False, null = True, blank = True, help_text = "IP address of pod"];
diff --git a/xos/synchronizer/steps/sync_kubernetesresourceinstance.py b/xos/synchronizer/steps/sync_kubernetesresourceinstance.py
new file mode 100644
index 0000000..60174bb
--- /dev/null
+++ b/xos/synchronizer/steps/sync_kubernetesresourceinstance.py
@@ -0,0 +1,80 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# 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.
+
+"""
+    sync_kubernetesresourceinstance.py
+
+    Synchronize KubernetesResourceInstance.
+
+    This sync_step is instantiates generic resources by executing them with `kubectl`.
+"""
+
+import os
+import subprocess
+import tempfile
+from synchronizers.new_base.syncstep import SyncStep
+from synchronizers.new_base.modelaccessor import KubernetesResourceInstance
+
+from xosconfig import Config
+from multistructlog import create_logger
+
+log = create_logger(Config().get('logging'))
+
+class SyncKubernetesResourceInstance(SyncStep):
+
+    """
+        SyncKubernetesResourceInstance
+
+        Implements sync step for syncing kubernetes resource instances. These objects are basically a yaml blob that
+        is passed to `kubectl`.
+    """
+
+    provides = [KubernetesResourceInstance]
+    observes = KubernetesResourceInstance
+    requested_interval = 0
+
+    def __init__(self, *args, **kwargs):
+        super(SyncKubernetesResourceInstance, self).__init__(*args, **kwargs)
+
+    def run_kubectl(self, operation, recipe):
+        (tmpfile, fn)=tempfile.mkstemp()
+        os.write(tmpfile, recipe)
+        os.close(tmpfile)
+        try:
+            p = subprocess.Popen(args=["/usr/local/bin/kubectl", operation, "-f", fn],
+                                 stdin=None,
+                                 stderr=subprocess.PIPE,
+                                 stdout=subprocess.PIPE,
+                                 close_fds=True)
+            (stdout, stderr) = p.communicate()
+            log.info("kubectl completed", stderr=stderr, stdout=stdout, recipe=recipe)
+            if p.returncode!=0:
+                raise Exception("Process failed with returncode %s" % p.returncode)
+        finally:
+            os.remove(fn)
+
+    def sync_record(self, o):
+        self.run_kubectl("apply", o.resource_definition)
+        if (o.kubectl_state == "created"):
+            o.kubectl_state = "updated"
+        else:
+            o.kubectl_state = "created"
+        o.save(update_fields=["kubectl_state"])
+
+    def delete_record(self, o):
+        if o.kubectl_state in ["created", "updated"]:
+            self.run_kubectl("delete", o.resource_definition)
+            o.kubectl_state="deleted"
+            o.save(update_fields=["kubectl_state"])
diff --git a/xos/synchronizer/tests/test_sync_kubernetesresourceinstance.py b/xos/synchronizer/tests/test_sync_kubernetesresourceinstance.py
new file mode 100644
index 0000000..82d957e
--- /dev/null
+++ b/xos/synchronizer/tests/test_sync_kubernetesresourceinstance.py
@@ -0,0 +1,132 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# 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 json
+import os
+import sys
+import unittest
+from mock import patch, PropertyMock, ANY, MagicMock, Mock
+from unit_test_common import setup_sync_unit_test
+
+class ApiException(Exception):
+    def __init__(self, status, *args, **kwargs):
+        super(ApiException, self).__init__(*args, **kwargs)
+        self.status = status
+
+def fake_init_kubernetes_client(self):
+    self.kubernetes_client = MagicMock()
+    self.v1core = MagicMock()
+    self.ApiException = ApiException
+
+class TestSyncKubernetesResourceInstance(unittest.TestCase):
+
+    def setUp(self):
+        self.unittest_setup = setup_sync_unit_test(os.path.abspath(os.path.dirname(os.path.realpath(__file__))),
+                                                   globals(),
+                                                   [("kubernetes-service", "kubernetes.proto")] )
+
+        self.MockObjectList = self.unittest_setup["MockObjectList"]
+
+        sys.path.append(os.path.join(os.path.abspath(os.path.dirname(os.path.realpath(__file__))), "../steps"))
+
+        from sync_kubernetesresourceinstance import SyncKubernetesResourceInstance
+        self.step_class = SyncKubernetesResourceInstance
+
+        self.service = KubernetesService()
+
+    def tearDown(self):
+        sys.path = self.unittest_setup["sys_path_save"]
+
+    @patch('subprocess.Popen')
+    def test_run_kubectl(self, mock_popen):
+        proc = Mock()
+        proc.communicate.return_value = ('output', 'error')
+        proc.returncode = 0
+
+        mock_popen.return_value = proc
+
+        step = self.step_class()
+        step.run_kubectl("create", "foo")
+
+        mock_popen.assert_called()
+
+    @patch('subprocess.Popen')
+    def test_run_kubectl_fail(self, mock_popen):
+        proc = Mock()
+        proc.communicate.return_value = ('output', 'error')
+        proc.returncode = 1
+
+        mock_popen.return_value = proc
+
+        step = self.step_class()
+        with self.assertRaises(Exception) as e:
+          step.run_kubectl("create", "foo")
+
+        self.assertEqual(e.exception.message, "Process failed with returncode 1")
+
+    def test_sync_record_create(self):
+        with patch.object(self.step_class, "run_kubectl") as run_kubectl:
+            xos_ri = KubernetesResourceInstance(name="test-instance", owner=self.service, resource_definition="foo")
+
+            run_kubectl.return_value = None
+
+            step = self.step_class()
+            step.sync_record(xos_ri)
+
+            run_kubectl.assert_called_with("apply", "foo")
+
+            self.assertEqual(xos_ri.kubectl_state, "created")
+
+    def test_sync_record_update(self):
+        with patch.object(self.step_class, "run_kubectl") as run_kubectl:
+            xos_ri = KubernetesResourceInstance(name="test-instance", owner=self.service, resource_definition="foo", kubectl_state="created")
+
+            run_kubectl.return_value = None
+
+            step = self.step_class()
+            step.sync_record(xos_ri)
+
+            run_kubectl.assert_called_with("apply", "foo")
+
+            self.assertEqual(xos_ri.kubectl_state, "updated")
+
+    def test_sync_record_delete(self):
+        with patch.object(self.step_class, "run_kubectl") as run_kubectl:
+            xos_ri = KubernetesResourceInstance(name="test-instance", owner=self.service, resource_definition="foo", kubectl_state="created")
+
+            run_kubectl.return_value = None
+
+            step = self.step_class()
+            step.delete_record(xos_ri)
+
+            run_kubectl.assert_called_with("delete", "foo")
+
+            self.assertEqual(xos_ri.kubectl_state, "deleted")
+
+    def test_sync_record_delete_never_created(self):
+        """ If the object was never saved, then we shouldn't try to delete it """
+        with patch.object(self.step_class, "run_kubectl") as run_kubectl:
+            xos_ri = KubernetesResourceInstance(name="test-instance", owner=self.service, resource_definition="foo")
+
+            run_kubectl.return_value = None
+
+            step = self.step_class()
+            step.delete_record(xos_ri)
+
+            run_kubectl.assert_not_called()
+
+
+if __name__ == '__main__':
+    unittest.main()
