61 lines
3.0 KiB
Plaintext
61 lines
3.0 KiB
Plaintext
---
|
|
title: Can I connect my pods to my virtual machine?
|
|
exercise: 6
|
|
date: '2024-04-14'
|
|
tags: ['openshift','virtualisation','kubernetes','kubevirt']
|
|
draft: false
|
|
authors: ['default']
|
|
summary: "How do we make a virtual machine accessible over the OpenShift SDN"
|
|
---
|
|
|
|
Time flies when you're having fun, after 17 months the "quick" proof of concept for OpenShift Virtualisation has now completed at Acme Financial Services and the CTO has asked for a final presentation from the local Red Hat pre sales team.
|
|
|
|
The Acme team have talked about modernisation throughout the proof of concept so for the final demo your local Red Hat team agree to again showcase how container workloads can be run alongside virtual machines and even balance traffic across containers and virtual machines.
|
|
|
|
This is it. No pressure but we need to nail this!
|
|
|
|
<Zoom>
|
|
| |
|
|
|:-----------------------------------------------------------------------------:|
|
|
| *"The best of both worlds!"* |
|
|
</Zoom>
|
|
|
|
|
|
## 6.1 - Deploy workloads
|
|
|
|
Your first challenge for this exercise is to deploy two workloads within the `acme-bank` namespace on your cluster:
|
|
|
|
1. The container image `quay.io/redhattraining/hello-world-nginx` running as a standard `deployment` named `acme-pod`, listening on port `8080`.
|
|
|
|
2. A linux virtual machine named `acme-vm` running that same workload on port `8080` in podman for simplicity.
|
|
|
|
Documentation you may find helpful is:
|
|
- https://docs.openshift.com/container-platform/4.15/applications/creating_applications/odc-creating-applications-using-developer-perspective.html#odc-deploying-container-image_odc-creating-applications-using-developer-perspective
|
|
- https://podman.io/docs/installation#installing-on-linux
|
|
- https://developers.redhat.com/cheat-sheets/podman-cheat-sheet
|
|
|
|
## 6.2 - Establish networking
|
|
|
|
Once the workloads are deployed your challenge is to create one service named `acme-balancer` that will load balance traffic across the virtual machine and regular container.
|
|
|
|
You'll know if this is working correctly when you can see two pods appearing in your service pod listing:
|
|
|
|
<Zoom>
|
|
| |
|
|
|:-----------------------------------------------------------------------------:|
|
|
| *"The best of both worlds!"* |
|
|
</Zoom>
|
|
|
|
Documentation you may find helpful is:
|
|
- https://docs.openshift.com/container-platform/4.15/virt/vm_networking/virt-exposing-vm-with-service.html
|
|
- https://kubernetes.io/docs/concepts/services-networking/service
|
|
|
|
|
|
## 6.2 - Check your work
|
|
|
|
If you've successfully prepared the demo environment for the CTO please post a message in `#event-anz-ocp-virt-hackathon` with the message:
|
|
|
|
> Please review team [name] solution for exercise 6.
|
|
|
|
Each of the 6.1 and 6.2 exercises are worth 15 points for a total of 30 points. The event team will reply in slack to confirm your updated team total score.
|