k8s.adoc 884 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. [#install-k8s]
  2. = Kubernetes with Manifest files
  3. OliveTin works just fine on Kubernetes. The easiest way to deploy it is with a
  4. Kubernetes `ConfigMap`, `Deployment`, `Service` and finally `Ingress`. Like so;
  5. == ConfigMap
  6. [source,yaml]
  7. ----
  8. include::example$k8s_configmap.yml[]
  9. ----
  10. The main application config.yml for OliveTin is specified in the `ConfigMap`
  11. above. You will want to edit this later - see the "Configuration" section.
  12. Next, we need a deployment;
  13. == Deployment
  14. [source,yaml]
  15. ----
  16. include::example$k8s_deployment.yml[]
  17. ----
  18. That should deploy OliveTin.
  19. == Service
  20. Now that OliveTin is deployed, expose it's port as a service;
  21. [source]
  22. ----
  23. user@host: kubectl expose deployment/olivetin
  24. ----
  25. Lastly, create a Ingress rule for for that service;
  26. == Ingress
  27. [source,yaml]
  28. ----
  29. include::example$k8s_ingress.yml[]
  30. ----
  31. include::partial$install/to_config.adoc[]