Red Hat OpenShift Container Platform 4.x

OpenShift is Red Hat's enterprise Kubernetes distribution with integrated CI/CD, monitoring, and security features.

OpenShift 4.x Architecture

IPI Installation

# Download OpenShift installer
wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-install-linux.tar.gz
tar xvf openshift-install-linux.tar.gz

Create install config

./openshift-install create install-config --dir=cluster

Start cluster installation

./openshift-install create cluster --dir=cluster --log-level=info

Set kubeconfig

export KUBECONFIG=cluster/auth/kubeconfig

Cluster Management

# Node status
oc get nodes
oc get clusterversion
oc get co

Project management

oc new-project myapp oc get projects

Application Deployment

# Create deployment
oc create deployment webapp --image=nginx:latest --replicas=3

Expose service

oc expose deployment webapp --port=80 oc expose svc webapp

Check status

oc get pods oc get route

Conclusion

OpenShift 4.x is a complete platform for enterprise Kubernetes needs. Operator pattern automates Day-2 operations.