K8S vs Openshift
K8S vs Openshift
1. Overview
Kubernetes
Kubernetes is an open-source platform initially developed by Google and now managed by the Cloud
Native Computing Foundation (CNCF). It automates deployment, scaling, and management of
containerized applications.
OpenShift
OpenShift, by Red Hat, is a Kubernetes distribution enhanced with enterprise features like security, a
developer-friendly web console, CI/CD tools, and streamlined workflows. Its open-source
counterpart is OKD (Origin Kubernetes Distribution).
2. Core Architecture
Cluster Must configure tools like Prometheus, Pre-integrated monitoring with Prometheus
Monitoring Grafana manually. and Grafana.
Kubernetes
OpenShift
• Ease of Installation: OpenShift provides a more streamlined installation process with its
installer for both cloud and on-premises environments.
4. Deployment of Applications
Kubernetes Example
Deploying an application involves creating resources like Deployments, Services, and Ingress.
1. Deployment YAML:
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-app
spec:
replicas: 2
selector:
matchLabels:
app: example-app
template:
metadata:
labels:
app: example-app
spec:
containers:
- name: example-container
image: nginx:1.20
ports:
- containerPort: 80
2. Expose Deployment:
apiVersion: v1
kind: Service
metadata:
name: example-service
spec:
selector:
app: example-app
ports:
- protocol: TCP
port: 80
targetPort: 80
type: LoadBalancer
3. Commands:
OpenShift Example
Deploying applications is simplified with commands like oc new-app or using the web console.
1. CLI Deployment:
oc expose svc/example-app
o OpenShift’s user-friendly web interface allows users to deploy and scale applications
with just a few clicks.
5. Security
RBAC (Role-Based
Custom configuration required. Pre-configured with stricter defaults.
Access Control)
Default CNI Requires third-party plugins like Flannel, Comes with a built-in SDN solution for
Plugin Calico, or Weave. seamless networking.
Requires configuring Ingress resources for Offers an integrated Route object for
Ingress
exposing services. exposing services.
Example
• Kubernetes:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
• OpenShift:
7. Built-in CI/CD
Requires manual setup of tools like Includes Jenkins pipelines and Tekton
CI/CD Tools
Jenkins or Tekton. out-of-the-box.
• Kubernetes:
• OpenShift:
9. Use Cases
10. Cost
• Kubernetes: Open-source and free to use. Costs are incurred for infrastructure and third-
party tools.
• OpenShift: Paid for enterprise features, with pricing based on the number of cores or nodes.
Flexibility Highly flexible but requires expertise. Less flexible but highly integrated.
Target Audience DevOps teams seeking full control. Enterprises seeking an integrated solution.
Conclusion
• Choose Kubernetes if you need a customizable, open-source solution and have the expertise
to manage integrations and configurations.