topics/openshift/README.md
| Name | Topic | Objective & Instructions | Solution | Comments |
|---|---|---|---|---|
| Projects 101 | Projects | Exercise | Solution | |
| My First Application | Applications | Exercise | Solution |
<a name="openshift-101"></a>
OpenShift is a container orchestration platform based on Kubernetes.
It can be used for deploying applications while having minimal management overhead. </b></details>
<details> <summary>How OpenShift is related to Kubernetes?</summary> <b>OpenShift is build on top of Kubernetes while defining its own custom resources in addition to the built-in resources. </b></details>
<details> <summary>True or False? OpenShift is a IaaS (infrastructure as a service) solution</summary> <b>False. OpenShift is a PaaS (platform as a service) solution. </b></details>
<details> <summary>True or False? OpenShift CLI supports everything kubectl supports, along with additional functionality</summary> <b>True </b></details>
<details> <summary>What are some of OpenShift added features on top of Kubernetes?</summary> <b>False. OpenShift supports rootless containers by default. </b></details>
<a name="openshift-architecture"></a>
The Scheduler. </b></details>
<details> <summary>What else the scheduler responsible for except pod placement?</summary> <b>Application high availability by spreading pod replicas between worker nodes </b></details>
<a name="openshift-hands-on-basics"></a>
oc api-resources
</b></details>
oc is used for creating applications, but also for administrating OpenShift cluster
odo is used solely for managing applications on OpenShift (mainly from developers' perspective) and has nothing to do with administrating the cluster </b></details>
<a name="openshift-projects"></a>
A project in OpenShift is a Kubernetes namespace with annotations.
In simpler words, think about it as an isolated environment for users to manage and organize their resources (like Pods, Deployments, Service, etc.). </b></details>
<details> <summary>How to list all projects? What the "STATUS" column means in projects list output?</summary> <b>oc get projects will list all projects. The "STATUS" column can be used to see which projects are currently active.
</b></details>
oc adm policy add-role-to-user <role> <user> -n <project>
</b></details>
oc new-app mysql
</b></details>
Federation </b></details>
Management and deployment of services and workloads across multiple independent clusters from a single API </b></details>
<details> <summary>Explain the following in regards to Federation:The time it takes for a disk to reach the place where the data is located and read a single block/sector.
Bones question: What is the random seek time in SSD and Magnetic Disk? Answer: Magnetic is about 10ms and SSD is somewhere between 0.08 and 0.16ms </b></details>
Master node automatically restarts the pod unless it fails too often. </b></details>
<details> <summary>What happens when a pod fails too often?</summary> <b>It's marked as bad by the master node and temporary not restarted anymore. </b></details>
<details> <summary>How to find out on which node a certain pod is running?</summary> <b>oc get po -o wide
</b></details>
Services in OpenShift define access policy to one or more set of pods.
They are connecting applications together by enabling communication between them
They provide permanent internal IP addresses and hostnames for applications
They are able to provide basic internal load balancing </b></details>
oc get serviceaccounts
</b></details>
A route is exposing a service by giving it hostname which is externally reachable </b></details>
<details> <summary>What Route is consists of?</summary> <b>False. It can run on any node. </b></details>
<details> <summary>Given an example of how a router is used</summary> <b>From OpenShift Docs: "Similar to the way that RBAC resources control user access, administrators can use security context constraints (SCCs) to control permissions for pods". </b></details>
<details> <summary>How to add the ability for the user `user1` to view the project `wonderland` assuming you are authorized to do so</summary> <b>oc adm policy add-role-to-user view user1 -n wonderland </b></details>
<details> <summary>How to check what is the current context?</summary> <b>oc whoami --show-context
</b></details>
More are supported and provided with OpenShift. </b></details>
<details> <summary>Explain serverless functions</summary> <b> </b></details> <details> <summary>What is the difference between Serverless Containers and Serverless functions?</summary> <b> </b></details>Replication Controller responsible for ensuring the specified number of pods is running at all times.
If more pods are running than needed -> it deletes some of them
If not enough pods are running -> it creates more </b></details>