Deploy an Application
In this quickstart page, you're going to deploy a sample application in a demo
TSB environment and validate the success using the TSB UI, and tctl
commands.
Before you get started make sure that you:
✓ Familiarize yourself with TSB concepts including workspaces and groups
✓ Install the TSB demo
The TSB demo install will do everything for you, including onboarding a cluster and installing all the operators that you'll need. It will also provide you with the URL and admin login information to access the TSB UI.
Deploy Bookinfo application
You're going to use the classic Istio bookinfo application to test TSB's functionality.
Create the namespace bookinfo
with istio-injection label:
- Standard
- OpenShift
kubectl create namespace bookinfo
kubectl label namespace bookinfo istio-injection=enabled
Deploy the bookinfo application:
kubectl apply -n bookinfo -f https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/platform/kube/bookinfo.yaml
oc create namespace bookinfo
oc label namespace bookinfo istio-injection=enabled
cat <<EOF | oc -n bookinfo create -f -
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: istio-cni
EOF
oc adm policy add-scc-to-group anyuid \
system:serviceaccounts:bookinfo
Deploy the bookinfo application:
oc apply -n bookinfo -f https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/platform/kube/bookinfo.yaml
Confirm your services are running
To confirm all of your services and pods are running, validate with:
- Standard
- OpenShift
kubectl get pods -n bookinfo
oc get pods -n bookinfo
Expected output:
NAME READY STATUS RESTARTS AGE
details-v1-5bc5dccd95-2qx8b 2/2 Running 0 38m
productpage-v1-f56bc8d5c-42kcg 2/2 Running 0 38m
ratings-v1-68f58946ff-vcrdh 2/2 Running 0 38m
reviews-v1-5976d456d4-nltg2 2/2 Running 0 38m
reviews-v2-57cf5b5488-rgq8l 2/2 Running 0 38m
reviews-v3-7745dbf976-4gnl9 2/2 Running 0 38m
Make sure you can access the bookinfo application
Confirm that you can access the bookinfo application:
- Standard
- OpenShift
kubectl exec "$(kubectl get pod -n bookinfo -l app=ratings -o jsonpath='{.items[0].metadata.name}')" \
-n bookinfo -c ratings -- curl -s productpage:9080/productpage | \
grep -o "<title>.*</title>"
oc exec "$(oc get pod -n bookinfo -l app=ratings -o jsonpath='{.items[0].metadata.name}')" \
-n bookinfo -c ratings -- curl -s productpage:9080/productpage | \
grep -o "<title>.*</title>"
You will see something similar to:
<title>Simple Bookstore App</title>