diff --git a/container/shipit/kubernetes/deployment.py b/container/shipit/kubernetes/deployment.py
index <HASH>..<HASH> 100644
--- a/container/shipit/kubernetes/deployment.py
+++ b/container/shipit/kubernetes/deployment.py
@@ -363,7 +363,10 @@ class Deployment(object):
     def _port_exists(port, ports):
         found = False
         for p in ports:
-            if p['containerPort'] == int(port):
+            if isinstance(p, dict) and p.get('containerPort') == int(port):
+                found = True
+                break
+            elif isinstance(p, int) and p == int(port):
                 found = True
                 break
         return found
diff --git a/container/shipit/openshift/deployment.py b/container/shipit/openshift/deployment.py
index <HASH>..<HASH> 100644
--- a/container/shipit/openshift/deployment.py
+++ b/container/shipit/openshift/deployment.py
@@ -364,7 +364,10 @@ class Deployment(object):
     def _port_exists(port, ports):
         found = False
         for p in ports:
-            if p['containerPort'] == int(port):
+            if isinstance(p, dict) and p.get('containerPort') == int(port):
+                found = True
+                break
+            elif isinstance(p, int) and p == int(port):
                 found = True
                 break
         return found
Consider variable type when checking for existing port (#<I>)