Try   HackMD

Deploying applications on Red Hat OpenShift Service Mesh

Environment

  • OpenShift 4.2.7 (3 master + 3 compute)
  • Installd Operators (in istio-service)
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

Prerequisite

Test Applications

  1. bookinfo (using Deployment)
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
oc new-project bookinfo
oc apply -n bookinfo -f https://raw.githubusercontent.com/Maistra/bookinfo/maistra-1.0/bookinfo.yaml
oc apply -n bookinfo -f https://raw.githubusercontent.com/Maistra/bookinfo/maistra-1.0/bookinfo-gateway.yaml
oc apply -n bookinfo -f https://raw.githubusercontent.com/istio/istio/release-1.1/samples/bookinfo/networking/destination-rule-all.yaml
  1. Simple HTTP Page (using Deployement Config)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

oc new-app https://github.com/pichuang/time --context-dir=rhel

Automatic Inject Sidecar

spec.template.metadata.annotations: sidecar.istio.io/inject: 'true'

  • In Deployment
...omit...

kind: Deployment
apiVersion: apps/v1
metadata:
  annotations:
    deployment.kubernetes.io/revision: '1'
  name: details-v1
  namespace: bookinfo
  labels:
    app: details
    version: v1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: details
      version: v1
  template:  <--- Should under template
    metadata:

...omit...

      annotations:
        sidecar.istio.io/inject: 'true' <--- Append

...omit...
  • In Deployment Config
kind: DeploymentConfig
apiVersion: apps.openshift.io/v1

...omit...

  template: <-- Should under template
    metadata:
      creationTimestamp: null
      labels:
        app: time
        deploymentconfig: time
      annotations:
        openshift.io/generated-by: OpenShiftNewApp
        sidecar.istio.io/inject: 'true'  <--- Append
    spec:

...omit...

References