Kubernetes
Kubernetes offers an elastic way of managing Instill Core CE to persist the services and scale resources horizontally and vertically.
Setup
Instill Core currently supports deploying on Kubernetes.
Cluster setup
We recommend using one of the local Kubernetes solutions:
- Docker Desktop (macOS) with Kubernetes enabled
- minikube
- kind
kubectl
setup
kubectl
setupMake sure the Kubernetes CLI tool kubectl
has been installed in your environment. If not, please follow the official instructions to install.
Make sure kubectl
is configured to connect to the local cluster by
kubectl config use-context <cluster-name>
Helm setup
Make sure Helm has been installed in your environment. If not, please follow the official instructions to install.
Check out the Core Helm repository on Artifact Hub.
To add the Core Helm repository, simply run
helm repo add instill-ai https://helm.instill-ai.com
, and
helm repo update
You can then run
helm search repo instill-ai
to see the charts:
NAME CHART VERSION APP VERSION DESCRIPTION
instill-ai/core <chart-version> <app-version> The Helm chart of Instill Core
Install
Install the Instill Core chart:
helm install core instill-ai/core --namespace instill-ai --create-namespace \
--set tags.prometheusStack=true
And visit the api-gateway
(http://localhost:8080) and Console (http://localhost:3000) by port forwarding:
export API_GATEWAY_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}")
export API_GATEWAY_CONTAINER_PORT=$(kubectl get pod --namespace instill-ai $API_GATEWAY_POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
export CONSOLE_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=console,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}")
export CONSOLE_CONTAINER_PORT=$(kubectl get pod --namespace instill-ai $CONSOLE_POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
export JAEGER_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=query,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}")
export JAEGER_CONTAINER_PORT=$(kubectl get pod --namespace instill-ai $JAEGER_POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
export PROMETHEUS_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=metrics,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}")
export PROMETHEUS_CONTAINER_PORT=$(kubectl get pod --namespace instill-ai $PROMETHEUS_POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
export GRAFANA_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}")
export GRAFANA_CONTAINER_PORT=$(kubectl get pod --namespace instill-ai $GRAFANA_POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
export RAY_HEAD_POD_NAME=$(kubectl get pods --namespace instill-ai -l "ray.io/identifier=core-ray-head" -o jsonpath="{.items[0].metadata.name}")
export RAY_HEAD_CONTAINER_PORT=$(kubectl get pod --namespace instill-ai $RAY_HEAD_POD_NAME -o jsonpath="{.spec.containers[?(@.name=='ray-head')].ports[?(@.name=='dashboard')].containerPort}")
kubectl --namespace instill-ai port-forward $API_GATEWAY_POD_NAME 8080:${API_GATEWAY_CONTAINER_PORT}
kubectl --namespace instill-ai port-forward $CONSOLE_POD_NAME 3000:${CONSOLE_CONTAINER_PORT}
Access to Grafana (http://localhost:3001) by port forwarding:
kubectl --namespace instill-ai port-forward $GRAFANA_POD_NAME 3001:${GRAFANA_CONTAINER_PORT}
Uninstall
To uninstall the chart:
helm uninstall core --namespace instill-ai
and clean up all Instill Core related persistent volumes:
kubectl delete pvc --all -n instill-ai
kubectl delete namespace instill-ai
Updated about 6 hours ago