An open API service indexing awesome lists of open source software.

https://github.com/osinfra-io/istio-test

An example Istio test application that shows information about the Google Kubernetes Engine (GKE) cluster.
https://github.com/osinfra-io/istio-test

golang google-cloud-platform infrastructure-as-code kubernetes osinfra platform-team terraform

Last synced: 12 months ago
JSON representation

An example Istio test application that shows information about the Google Kubernetes Engine (GKE) cluster.

Awesome Lists containing this project

README

          

# Istio Test LogoIstio Test

An example Istio test application that shows information about the Google Kubernetes Engine (GKE) cluster.

## Usage

```yaml
---
apiVersion: v1
kind: Namespace

metadata:
name: istio-test

---
apiVersion: apps/v1
kind: Deployment

metadata:
name: istio-test
namespace: istio-test

spec:
replicas: 1
selector:
matchLabels:
app: istio-test

template:
metadata:
labels:
app: istio-test

spec:
containers:
- image: ghcr.io/osinfra-io/istio-test:latest
imagePullPolicy: Always
name: istio-test

ports:
- containerPort: 8080

resources:
limits:
cpu: "50m"
memory: "128Mi"
requests:
cpu: "25m"
memory: "64Mi"

---
apiVersion: v1
kind: Service

metadata:
name: istio-test
namespace: istio-test

labels:
app: istio-test

spec:
ports:
- name: http
port: 8080
targetPort: 8080

selector:
app: istio-test

```

After deploying, you can get the information about the GKE cluster by running the following command:

```bash
kubectl port-forward --namespace istio-test $(kubectl get pod --namespace istio-test --selector="app=istio-test" --output jsonpath='{.items[0].metadata.name}') 8080:8080
```

Curl the endpoint:

```bash
curl http://localhost:8080/istio-test
```