Kubernetes
Create a Service Account
gcloud iam service-accounts create ushaflow-core-eeGrant dialogflow.reader and dialogflow.client roles to the Service Account
gcloud projects add-iam-policy-binding <your-project-id> --member serviceAccount:ushaflow-core-ee@<your-project-id>.iam.gserviceaccount.com --role roles/dialogflow.readergcloud projects add-iam-policy-binding <your-project-id> --member serviceAccount:ushaflow-core-ee@<your-project-id>.iam.gserviceaccount.com --role roles/dialogflow.clientGenerate Service Account key
gcloud iam service-accounts keys create service_account.json --iam-account ushaflow-core-ee@<your-project-id>.iam.gserviceaccount.comUsing kubectl create a Secret ressource, containing the service account key
kubectl create secret generic ushaflow-core-ee --from-file=service_account.jsonCreate a ConfigMap containing desired configuration options
apiVersion: v1
kind: ConfigMap
metadata:
name: ushaflow-core-ee
data:
TOKEN: <your license key>
GOOGLE_APPLICATION_CREDENTIALS: /app/service_account.jsonCreate a Deployment contaning the container
apiVersion: apps/v1
kind: Deployment
metadata:
name: ushaflow-core-ee
spec:
selector:
matchLabels:
app: ushaflow-core-ee
template:
metadata:
labels:
app: ushaflow-core-ee
spec:
containers:
- name: ushaflow-core-ee
image: ghcr.io/ushaflow/core-ee
envFrom:
- configMapRef:
name: ushaflow-core-ee
volumeMounts:
- name: service-account
subPath: service_account.json
mountPath: /app/service_account.json
readOnly: true
volumes:
- name: service-account
secret:
secretName: ushaflow-core-eeExpose the Deployment using a Service
apiVersion: v1
kind: Service
metadata:
name: ushaflow-core-ee
spec:
selector:
app: ushaflow-core-ee
ports:
- name: http
targetPort: 8090
port: 80Expose the Service using Ingress
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ushaflow-core-ee
spec:
rules:
- host: example.com
http:
paths:
- path: /
backend:
serviceName: ushaflow-core-ee
servicePort: httpLast updated
Was this helpful?