You will conduct these labs in an OpenShift cluster. As in the previous terminal deployment exercise, you can access your cluster via console and CLI.
You will use the OpenShift ‘oc’ CLI to execute commands for the majority of this lab.
Login using API endpoint and remember to add the '--insecure-skip-tls-verify=true' flag
$ oc login https://api.example.redhatgov.io:6443 --insecure-skip-tls-verify=true Authentication required for https://api.example.redhatgov.io:6443 (openshift) Username: userYOUR# Password: Login successful.
The instructor will have preconfigured your projects for you.
List your projects:
You should see two projects: your user project (e.g. ‘userX’) and ‘istio-system’.
Switch to your user project. For example:
oc project userYOUR#
Let’s take a look at the project.
List the pods in the project:
oc get pods
NAME READY STATUS RESTARTS AGE istio-demogateway-user1-xxxxxxxxxx-xxxxx 1/1 Running 0 2m41s keycloak-operator-xxxxxxxxx-xxxxx 1/1 Running 0 15h
The gateway is a load balancer dedicated to your project. You will configure this load balancer in the next lab. The keycloak operator will be used in the security labs.
Finally, set the project name variable.
Run this command:
PROJECT_NAME=$(oc project -q)
Next we need a local copy of our application code.
Clone the repository:
git clone https://github.com/RedHatGov/openshift-microservices.git
Checkout the workshop-stable branch:
cd openshift-microservices && git checkout workshop-stable
Navigate to the workshop directory:
Istio should have been installed in the cluster by the instructor. Let’s make sure Istio is running in the cluster. You will only have view access to the Istio project.
List all the Istio components:
oc get pods -n istio-system
NAME READY STATUS RESTARTS AGE grafana-xxxxxxxxx-xxxxx 2/2 Running 0 17m istio-citadel-xxxxxxxxx-xxxxx 1/1 Running 0 20m istio-egressgateway-xxxxxxxx-xxxxx 1/1 Running 0 17m istio-galley-xxxxxxxx-xxxxx 1/1 Running 0 19m istio-ingressgateway-xxxxxxxxx-xxxxx 1/1 Running 0 17m istio-pilot-xxxxxxxxx-xxxxx 2/2 Running 0 18m istio-policy-xxxxxxxxx-xxxxx 2/2 Running 0 19m istio-sidecar-injector-xxxxxxxxx-xxxxx 1/1 Running 0 17m istio-telemetry-xxxxxxxxx-xxxxx 2/2 Running 0 19m jaeger-xxxxxxxxx-xxxxx 2/2 Running 0 19m kiali-xxxxxxxxx-xxxxx 1/1 Running 0 16m prometheus-xxxxxxxxx-xxxxx 2/2 Running 0 19m
The primary control plane components are Pilot, Mixer, and Citadel. Pilot handles traffic management. Mixer handles policy and telemetry. Citadel handles security.