Frequently asked questions about OpenShift, its components, and how to work with them.
OpenShift is a Kubernetes-based container platform that provides a complete application development and deployment environment with enterprise features.
OpenShift extends Kubernetes with:
- Additional APIs (ImageStreams, Builds, Routes)
- Enhanced security (SCCs, network policies)
- Developer tools (Web console, Source-to-Image)
- Built-in CI/CD capabilities
- Enterprise features (multi-tenancy, quotas)
- Control Plane: API Server, etcd, Controller Manager, Scheduler
- Compute Nodes: Kubelet, CRI-O, Kube-proxy, SDN
- Infrastructure: Router, Registry, Build System, Web Console
Pods communicate through:
- Direct Pod IP: Pods can reach each other by IP
- Services: Virtual IPs for service discovery
- DNS: Service names resolve to service IPs
- Network Policies: Control allowed traffic
- Services get virtual IPs
- CoreDNS resolves service names
- Kube-proxy routes traffic to pods
- Endpoints track pod IPs
Routes provide external access:
- Router pods watch Route resources
- Router configures HAProxy
- External traffic hits router
- Router forwards to service
- Service load balances to pods
The API server:
- Validates and authenticates requests
- Authorizes based on RBAC
- Applies admission control
- Stores state in etcd
- Notifies controllers of changes
Each pod gets its own IP address:
- CNI plugin assigns IP to pod
- SDN manages pod network
- Open vSwitch handles switching
- Network policies control traffic
A Service is a virtual IP that:
- Provides stable endpoint for pods
- Load balances across pod endpoints
- Enables service discovery via DNS
- Abstracts pod IP changes
A Route provides external HTTP/HTTPS access:
- Maps external hostname to service
- Handles TLS termination
- Provides load balancing
- Integrates with router pods
Network policies control traffic:
- Define ingress/egress rules
- Select pods by labels
- Enforced by SDN plugin
- Applied at pod level
OpenShift provides:
- Kubernetes APIs: All standard Kubernetes APIs
- OpenShift APIs: ImageStreams, Builds, Routes, Projects, Templates
- Custom APIs: Operator-defined APIs via CRDs
# List all API resources
oc api-resources
# List API versions
oc api-versions
# Describe specific API
oc explain <resource>OpenShift supports:
- OAuth: Web-based authentication
- LDAP/AD: Directory integration
- Certificates: Client certificates
- Service Accounts: For applications
Authorization uses RBAC:
- Roles: Define permissions
- RoleBindings: Bind roles to users
- ClusterRoles: Cluster-wide permissions
- ClusterRoleBindings: Cluster-wide bindings
- Check pod status:
oc get pod <name> - Check events:
oc describe pod <name> - Check logs:
oc logs <pod-name> --previous - Check node resources:
oc describe node - Check image pull:
oc get events | grep <pod-name>
- Check pod network:
oc exec <pod> -- ip addr - Check DNS:
oc exec <pod> -- nslookup <service> - Check service:
oc get service <name> - Check endpoints:
oc get endpoints <name> - Check network policies:
oc get networkpolicies
- Check authentication:
oc whoami - Check authorization:
oc auth can-i <verb> <resource> - Check API server:
oc get clusteroperators - Check logs:
oc logs -n openshift-kube-apiserver <pod> - Test API:
curl -k -H "Authorization: Bearer $(oc whoami -t)" <api-url>
- External Request: Check route → service → pod
- Internal Request: Check service → endpoints → pod
- API Request: Check authentication → authorization → API → etcd
- Resource Creation: Check API → controller → resource → kubelet
- Start broad:
oc get allto see everything - Narrow down:
oc get <resource-type>for specific type - Get details:
oc describe <resource>for information - Follow relationships: Check
ownerReferencesand labels - Check events:
oc get eventsfor recent activity
- Use
oc describeto see relationships - Check
ownerReferencesin resource YAML - Follow labels and selectors
- Check events for interactions
- Review Component Interactions Guide
# Find pods for a service
oc get pods -l app=<label> -n <namespace>
# Find services for a route
oc get route <route-name> -o jsonpath='{.spec.to.name}'
# Find deployments for a pod
oc get pod <pod-name> -o jsonpath='{.metadata.ownerReferences}'- Check the documentation index
- Review Navigation and Debugging Guide
- Review Component Interactions Guide
- Check OpenShift official documentation
- Ask cluster administrators