Skip to content

Commit

Permalink
IL-421 Kubernetes notes
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFehseTNG committed Apr 10, 2024
1 parent 8fa4ccc commit e7affdd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/examples/issue_classification_user_journey.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@
"- Setup Pulumi\n",
"- Check that it is working\n",
"\n",
"### Enviroment variables\n",
"### Environment variables\n",
"TODO: Describe how to set environment variables \n",
"\n",
"### FastAPI service\n",
Expand All @@ -770,8 +770,25 @@
"poetry export --without-hashes --format=requirements.txt > requirements.txt\n",
"\n",
"### Kubernetes\n",
"\n"
"\n",
"- Install `minikube`, see e.g. [here](https://minikube.sigs.k8s.io/docs/start/)\n",
"- `minikube start`\n",
"- Setup current shell to use minikube's docker daemon: `eval $(minikube -p minikube docker-env)`\n",
"- build docker container as above\n",
" - check if docker image exists:\n",
" - `minikube ssh`\n",
" - `docker image ls`, you should see it listed.\n",
"- Start Kubernetes : `kubectl apply -f classification_deployment.yaml`\n",
"- list all Kubernetes pods: `kubectl get pods -A`\n",
"- forward port: `kubectl port-forward banana-7f84bb87d9-dk4ww 8000:80` Note: you will have to specify the exact pod name (here: `banana-7f84bb87d9-dk4ww`)\n",
"- Check, if you can access `localhost:8000`.\n",
" - check `curl -X POST localhost:8000/classify --json '{\"chunk\": \"long text\", \"labels\": [\"abc\", \"def\"]}'`\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down
Binary file modified src/examples/issue_classification_user_journey/requirements.txt
Binary file not shown.

0 comments on commit e7affdd

Please sign in to comment.