{"id":43685245,"url":"https://github.com/bonavadeur/ikukantai","last_synced_at":"2026-02-05T02:33:39.523Z","repository":{"id":240639217,"uuid":"803135998","full_name":"bonavadeur/ikukantai","owner":"bonavadeur","description":"ikukantai - 行く艦隊 - Knative Serving based Serverless Platform designed for Distributed System","archived":false,"fork":false,"pushed_at":"2024-11-24T05:50:11.000Z","size":6057,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-24T06:24:32.171Z","etag":null,"topics":["distributed-systems","edge-cloud","ikukantai","knative","kubernetes","serverless"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bonavadeur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-20T06:20:58.000Z","updated_at":"2024-11-24T05:50:15.000Z","dependencies_parsed_at":"2024-07-26T11:15:13.481Z","dependency_job_id":"1bc76ae9-03f1-4f40-b2dd-c75f7e5de5e6","html_url":"https://github.com/bonavadeur/ikukantai","commit_stats":null,"previous_names":["bonavadeur/ikukantai"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bonavadeur/ikukantai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonavadeur%2Fikukantai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonavadeur%2Fikukantai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonavadeur%2Fikukantai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonavadeur%2Fikukantai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bonavadeur","download_url":"https://codeload.github.com/bonavadeur/ikukantai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonavadeur%2Fikukantai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29107554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T02:25:47.218Z","status":"ssl_error","status_checked_at":"2026-02-05T02:25:44.497Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed-systems","edge-cloud","ikukantai","knative","kubernetes","serverless"],"created_at":"2026-02-05T02:33:38.941Z","updated_at":"2026-02-05T02:33:39.517Z","avatar_url":"https://github.com/bonavadeur.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ikukantai - 行く艦隊\n\n### (The Iku Fleet - Hạm Đội Ikư - 行く艦隊)\n\n[![release](https://img.shields.io/badge/ikukantai--v2.1-log?style=flat\u0026label=release\u0026color=crimson)]()\n[![license](https://img.shields.io/badge/closed--source-log?style=flat\u0026label=license\u0026color=darkred)](LICENSE)\n[![CloudNet2024](https://img.shields.io/badge/IEEE--CloudNet--2024-log?style=flat\u0026label=publication\u0026color=dodgerblue)](https://cloudnet2024.ieee-cloudnet.org)\n\n[![Kubernetes](https://img.shields.io/badge/kubernetes-%23326ce5.svg?style=for-the-badge\u0026logo=kubernetes\u0026logoColor=white\u0026link=https%3A%2F%2Fkubernetes.io)](https://kubernetes.io/)\n[![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge\u0026logo=linux\u0026logoColor=black)]()\n[![Knative](https://img.shields.io/badge/knative-log?style=for-the-badge\u0026logo=knative\u0026logoColor=white\u0026labelColor=%230865AD\u0026color=%230865AD)](https://knative.dev/docs/)\n[![Go](https://img.shields.io/badge/go-%2300ADD8.svg?style=for-the-badge\u0026logo=go\u0026logoColor=white)](https://go.dev/)\n[![Prometheus](https://img.shields.io/badge/Prometheus-E6522C?style=for-the-badge\u0026logo=Prometheus\u0026logoColor=white)](https://prometheus.io/)\n[![EnvoyProxy](https://img.shields.io/badge/envoy-log?style=for-the-badge\u0026logo=envoyproxy\u0026logoColor=white\u0026labelColor=%23AC6199\u0026color=%23AC6199)](https://www.envoyproxy.io/)\n[![AWS](https://img.shields.io/badge/AWS-%23FF9900.svg?style=for-the-badge\u0026logo=amazon-aws\u0026logoColor=white)](https://aws.amazon.com/)\n[![Protobuf](https://img.shields.io/badge/Protobuf-log?style=for-the-badge\u0026logo=nani\u0026logoColor=green\u0026labelColor=red\u0026color=darkgreen)](https://protobuf.dev/)\n\n\n`ikukantai` is a Knative Serving based Serverless Platform designed for Distributed Computing Infrastructure. `ikukantai` is easy-to-develop platform supports research and the integration of Load-Balancing, Scheduling and Queuing algorithms in Container Virtualization environment.\n\n`ANNOUNCEMENT`: **`ikukantai`'s publication has been accepted at IEEE CloudNet Conference 2024 (International Conference on Cloud Networking)**\n\n![ikukantai](docs/images/ikukantai_wp.jpg)\n\n## 1. Motivation\n\nContainer virtualization is becoming an inevitable trend in modern computing and infrastructure technology. Since its release in 2014, **Kubernetes** has established itself as the de facto standard for application deployment and system operations in the industry. Numerous projects under the CNCF umbrella have further strengthened **Kubernetes**'s position in cloud computing. Knative, a serverless project nurtured within the CNCF ecosystem, has introduced scale-to-zero capabilities to **Kubernetes**, offering new opportunities for resource optimization and sustainable energy solutions in the scientific community.\n\nThe built-in Load-Balancing, Scheduling, Queuing algorithms implemented in both Vanilla **Kubernetes** and Vanilla Knative are designed for very general purposes but require significant improvements for specialized use cases. During [our research](docs/publication/CloudNet_2024.pdf) on deploying and evaluating Serverless technology in Edge-Cloud environment, we discovered that the Load-Balancing and Scheduling mechanism of **Kubernetes**/Knative is inadequate for such heterogeneous setups. `ikukantai` was born not only to address this issue but also to serve as a programmable platform that allows solving classic problems related to container Load-Balancing, Scheduling and Queing in the real testbed implementation approach while removing the complex programming barrier for scientists.\n\nIn this project, we propose an approach that improves Knative from the inside, a Unified Serverless Platform for Distributed Systems. It is `ikukantai` (行く艦隊 - The iku Fleet - Hạm Đội Ikư - translated from Japanese).\n\n## 2. Architecture\n\n![Arch](docs/images/arch.jpg)\n\nTo understand functions of modules: `monlat`, `Katyusha`, `Nonna`, `Seika` and `Miporin`, please jump to [5.`ikukantai` ecosystem](#ecosystem)\n\n## 3. Installation\n\n### 3.1. System requirements\n\n+ Some nodes are Physical Machine or Virtual Machine, least 4 CPU and 16GB RAM for master-node and  3 CPU 6GB RAM for each worker-nodes  \n+ Ubuntu-Server or Ubuntu Desktop version 20.04  \n+ Kubernetes version 1.26.3  \n+ Calico installed on Kubernetes cluster  \n+ MetalLB installed on Kubernetes cluster (for laboratory experiments, we deploy system on a bare-metal cluster)  \n+ Helm is installed\n\n### 3.2. Install support mechanisms\n\n#### 3.2.1. Monlat - the network latency monitoring system for Kubernetes\n\nWe develop a network latency monitoring system named `monlat`, for more detail and installation please visit [monlat](https://github.com/bonavadeur/monlat). First, let's install Prometheus Stack on Kubernetes Cluster, then install `monlat` later. The network latency metrics will be collected by Prometheus.\n\n#### Install Prometheus Stack\n\nWe follow Prometheus Stacks installation guide from [Knative's Docs](https://knative.dev/docs/serving/observability/metrics/collecting-metrics/)\n\n```bash\n$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts\n$ helm repo update\n$ helm install prometheus prometheus-community/kube-prometheus-stack -n default -f manifest/prometheus/values.yaml\n\n$ kubectl apply -f https://raw.githubusercontent.com/knative-extensions/monitoring/main/grafana/dashboards.yaml\n\n$ kubectl create namespace metrics\n$ kubectl apply -f https://raw.githubusercontent.com/knative/docs/main/docs/serving/observability/metrics/collector.yaml\n```\n\nNote: [The OpenTelemetry Collector](https://grafana.com/docs/alloy/latest/reference/components/otelcol/otelcol.exporter.logging/#:~:text=The%20OpenTelemetry%20Collector%20logging%20exporter,Collector%20repository%20in%20September%202024.) logging exporter is deprecated and removed from the upstream Collector repository in September 2024, so that you have to change all `logging` fields to `debug` using the following commands:\n\n```bash\nchmod +x ./hack/fix-otel-collector-cfg.sh\n./hack/fix-otel-collector-cfg.sh\n```\n\n#### Install monlat\n\nFollow [monlat installation guide](https://github.com/bonavadeur/monlat) to install `monlat` correctly. `monlat` is released under Apache License.\n\n#### 3.2.2. Seika - Kubernetes Custom Resource maintains quantity of Pod in each Node\n\nTo control the ability of create and delete Function in each Node exactly, we develop a Kubernetes Custom Resource named [Seika](https://github.com/bonavadeur/seika). Seika operate like a bunch of Deployments that each Deployment control number of Pod in only one Node. By using Seika, we can create more Functions in Node that have more traffic and delete less Functions in Node that have less traffic. To install, please visit [Seika](https://github.com/bonavadeur/seika). The Seika's document includes guides for installation, usage, development. `Seika` is released under Apache License.\n\n### 3.3. Install Knative Serving with Kourier is networking option and Our Extra-Controller\n\nIn this step we install Knative Serving's components (CRD, Knative's Pods) by applying .yaml files. Notes that the applied manifests is modified by ours, we do not use the original images and configurations. Our images are developed base on [Knative-Serving](https://github.com/knative/serving/tree/release-1.12) version 1.12.1 and [Kourier](https://github.com/knative-extensions/net-kourier/tree/release-1.12) version 1.12.1\n\n```bash\n# Install CRD\nkubectl apply -f manifest/1-serving-crd.yaml\n# Install Knative's Pod\nkubectl apply -f manifest/2-serving-core.yaml\n# Extra configmap and RBAC\nkubectl apply -f manifest/miporin/configmap.yaml\nkubectl apply -f manifest/miporin/rbac.yaml\n# Install Networking Plugin\nkubectl apply -f manifest/3-kourier.yaml\n# Run domain config job\nkubectl apply -f manifest/4-serving-default-domain.yaml\n```\n\nWait until job/default-domain is success\n\n```bash\n# check if default-domain job is success\nkubectl -n knative-serving get job | grep default-domain\nNAME             COMPLETIONS   DURATION   AGE\ndefault-domain   1/1           13s        71s\n# delete config job\nkubectl delete -f manifest/4-serving-default-domain.yaml\n```\n\nInstall extra-controller `miporin`\n\n```bash\nkubectl apply -f manifest/miporin/miporin.yaml\n```\n\n`miporin` is the extra-controller working alongside and is independently of Knative's controller. For more information about `miporin`, please visit [bonavadeur/miporin](https://github.com/bonavadeur/miporin). Miporin is released under Apache License.\n\nInstall correct images by version\n\n```bash\n# Replace Knative's images by Ikukantai's images\nchmod +x -R hack/*\n./hack/replace-image.sh\n```\n\n### 3.4. Making some changes\n\n#### 3.4.1. Kourier Gateway\n\n```bash\n# use local 3scale-kourier-gateway pod for every request\nkubectl -n kourier-system patch service kourier --patch '{\"spec\":{\"internalTrafficPolicy\":\"Local\",\"externalTrafficPolicy\":\"Local\"}}'\nkubectl -n kourier-system patch service kourier-internal --patch '{\"spec\":{\"internalTrafficPolicy\":\"Local\"}}'\n```\n\n### 3.5. Check your setup\n\nYou must see **3scale-kourier-gateway** and **activator** present in all nodes, each node has one **activator** and one **3scale-kourier-gateway**\n\n```bash\n$ kubectl -n knative-serving get pod -o wide | grep activator\nactivator-5cd6cb5f45-5nnnb                1/1     Running     0                156m   10.233.75.29     node2   \u003cnone\u003e           \u003cnone\u003e\nactivator-5cd6cb5f45-fkp2r                1/1     Running     0                156m   10.233.102.181   node1   \u003cnone\u003e           \u003cnone\u003e\nactivator-5cd6cb5f45-j6bqq                1/1     Running     0                156m   10.233.71.47     node3   \u003cnone\u003e           \u003cnone\u003e\n\n$ kubectl -n kourier-system get pod -o wide\nNAME                                     READY   STATUS    RESTARTS         AGE    IP               NODE    NOMINATED NODE   READINESS GATES\n3scale-kourier-gateway-864554589-5dgxl   1/1     Running   11 (5h26m ago)   2d5h   10.233.75.28     node2   \u003cnone\u003e           \u003cnone\u003e\n3scale-kourier-gateway-864554589-btfqf   1/1     Running   12 (5h21m ago)   2d5h   10.233.71.29     node3   \u003cnone\u003e           \u003cnone\u003e\n3scale-kourier-gateway-864554589-p7q56   1/1     Running   13 (5h29m ago)   2d5h   10.233.102.176   node1   \u003cnone\u003e           \u003cnone\u003e\n\n$ kubectl -n knative-serving get pod | grep miporin\nmiporin-597dcddbc-qvlc6                   1/1     Running     0                143m\n```\n\n## 4. Try it out\n\nEach time you deploy a **ksvc** (in API service.serving.knative.dev), `ikukantai` will create two custom resources automatically: one Seika and one ServiceMonitor.\n\n+ **Seika** (in API seika.batch.bonavadeur.io) is used for ability of controlling Function creation and deletion precisely in each Node\n+ **ServiceMonitor** (in API servicemonitor.monitoring.coreos.com) is used for scraping metrics of each Function to Prometheus\n\nFirst, apply a simple web application named *hello*. The annotation *autoscaling.knative.dev/window: \"12s\"* means that if there is not traffic come to system in 12s, the Function will be scaled down. Immediately after you apply *hello* Function, the first Pod created is not under your control *hello*. You need to wait until this pod deleted after 12s, the system is now under your control.\n\n```bash\n# install a demo app\n$ kubectl apply -f manifest/demo/hello.yaml\nWarning: Kubernetes default value is insecure, Knative may default this to secure in a future release: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation, spec.template.spec.containers[0].securityContext.capabilities, spec.template.spec.containers[0].securityContext.runAsNonRoot, spec.template.spec.containers[0].securityContext.seccompProfile\nservice.serving.knative.dev/hello created\n```\n\nGet all relevant resources:\n\n```bash\n$ kubectl get ksvc,pod,seika,servicemonitor | grep hello\nservice.serving.knative.dev/hello   http://hello.default.192.168.133.2.sslip.io   hello-00001    hello-00001   True    \npod/hello-00001-deployment-7df54dc57f-rx7xr                  2/2     Running   0               11s\nseika.batch.bonavadeur.io/hello   [\"node1\",\"node2\",\"node3\"]   0-0-0/0-0-0\nservicemonitor.monitoring.coreos.com/hello\n```\n\nWait until the first Pod is deleted (after the period set by annotation autoscaling.knative.dev/window: \"12s\")\n\n```bash\n$ kubectl get ksvc,pod,seika,servicemonitor | grep hello\nservice.serving.knative.dev/hello   http://hello.default.192.168.133.2.sslip.io   hello-00001    hello-00001   True\nseika.batch.bonavadeur.io/hello   [\"node1\",\"node2\",\"node3\"]   0-0-0/0-0-0\nservicemonitor.monitoring.coreos.com/hello\n```\n\nUse `netem` setup latency between nodes. In this experiment, I setup latency from **node1**, **node2** to **node3** is 50ms. So, when make request from node3, a new Pod is prefer scheduled on **node3** instead of the remain nodes.\n\n```bash\n# make request from node3\nroot@node3:~$ curl hello.default.svc.cluster.local\nKonnichiwa from hello-node3-xgvq5 in node3\n\n# list all resources\nroot@node1:~$ kubectl get ksvc,pod,seika,servicemonitor | grep hello\nservice.serving.knative.dev/hello   http://hello.default.192.168.133.2.sslip.io   hello-00001   hello-00001   True\npod/hello-node3-xgvq5                                        2/2     Running   0               40s\nseika.batch.bonavadeur.io/hello   [\"node1\",\"node2\",\"node3\"]   0-0-1/0-0-1\nservicemonitor.monitoring.coreos.com/hello\n```\n\nThe Scheduling Algorithm is implemented in [miporin](https://github.com/bonavadeur/miporin), package `github.com/bonavadeur/miporin/pkg/yukari`. To enable Scheduling Feature of `ikukantai` Fleet, set config `ikukantai-miporin-enable-yukari: \"true\"` in `configmap/config-ikukantai`, namespace `default`\n\n## 5. `ikukantai` ecosystem \u003ca name=\"ecosystem\"\u003e\u003c/a\u003e\n\n### 5.1. Support tools\n\nThe following tools support `ikukantai` Fleet operation and can work independently from `ikukantai` in any Kubernetes Cluster.\n\n[Monlat](https://github.com/bonavadeur/monlat) - the latency monitoring system for Kubernetes\n\n[Seika](https://github.com/bonavadeur/seika) - the Kubernetes Custom Resource that maintains quantity of Pods in each Node\n\n### 5.2. The tanks on the Fleet\n\n`ikukantai` is closed-source, but you can exploit all extra power by using tanks deployed on the flight deck of the Fleet. We have a plan for developing 4 extra-components that make algorithm implementation easier in the near future.\n\n[Miporin](https://github.com/bonavadeur/miporin) - tank commander, the extra-controller working alongside and is independently of Knative's controller. `miporin` also act as Scheduler of the Fleet. `miporin` is written in Go and release under Apache-2.0 License.\n\n[Nonna](https://github.com/bonavadeur/nonna) - Queue Modifier Module on the Fleet, written in Go, released under Apache-2.0 License.\n\n[Katyusha](https://github.com/bonavadeur/katyusha) - Load Balancing Algorithm Implementation Module on the Fleet, written in Go, released under Apache-2.0 License.\n\nPanzer vor!\n\n## 6. Author\n\nĐào Hiệp - Bonavadeur - ボナちゃん  \nThe Future Internet Laboratory, Room E711, C7 Building, Hanoi University of Science and Technology, Vietnam.  \n未来のインターネット研究室, C7 の E ７１１、ハノイ百科大学、ベトナム。  \n\n![](docs/images/github-wp.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonavadeur%2Fikukantai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonavadeur%2Fikukantai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonavadeur%2Fikukantai/lists"}