salaboy / from-monolith-to-k8s

Workshop-style guide for creating Cloud-Native applications running on top of Kubernetes
http://salaboy.com
Apache License 2.0
340 stars 92 forks source link

Run the application using Kubernetes KIND #2

Closed salaboy closed 3 years ago

salaboy commented 3 years ago

https://kind.sigs.k8s.io

The tricky thing here is to find out the correct configuration to be able to run all services in a laptop setup. I would start with 8GB ram and 4 CPUs. This might not be available in all laptops but I think that it is a good starting point.

None of the services are tuned right now (for memory and CPU consumption) , we should do that in a different issue.

salaboy commented 3 years ago

In order to run the application with KIND, after KIND is setup and kubectl is configured against the cluster you can use helm. I will create an issue for myself to document this tomorrow.

salaboy commented 3 years ago

@mcruzdev tomorrow my morning I will document how to install with Helm for you to try this one.

salaboy commented 3 years ago

@mcruzdev done.. I think that you can follow this section to start trying out the application on Kubernetes KIND -> https://github.com/salaboy/from-monolith-to-k8s/blob/master/README.md#installing-the-application---no-pipelines

salaboy commented 3 years ago

I am sure that for the application to run on KIND we will need to also install vault.. so I've provided a link there to the installation instructions.. but let me know if you get stuck with that.

salaboy commented 3 years ago

For external secrets with Vault you can take a look at here:

https://medium.com/craftech/manage-your-kubernetes-secrets-with-hashicorp-vault-25d2fb8119f

It gets quite complicated.. but I think that it is worth the research

mcruzdev commented 3 years ago

@salaboy thank you, I gonna try again tomorrow ;) After, I will send a feedback

salaboy commented 3 years ago

this is done now..

jeanlouisvanbelle commented 1 year ago

Hi Mr. Salatino - I just started reading your book and I find it very enlightening. I am a novice and configured all on an older Windows 10 Pro laptop. It works now, but I would recommend novices the following to as not to waste too much time with figuring out the set-up:

  1. When you have Windows as the main OS, then you must first install a linux VM. I installed Ubuntu and also had to enable Windows Subsystem for Linux (WSL2).
  2. Docker and K8s (kubectl and KinD, to be precise) are easy to install, but I had some problems with Helm. I think it is easier to use the Chocolatey Windows package manager than the binary files or the script. Also, when running the commands from PowerShell, you need to use PowerShell as an administrator from time to time (that is logical but I just wanted to note it on this forum so to make sure that other people like me (i.e., novices) lose less time than I did).
  3. Using PowerShell as a command prompt requires one to effectively put the configuration information in a config.yaml file. Hence, I used this command on the PowerShell CLI to create the cluster: kind create cluster --name dev --config=C:\Users...\config.yaml
  4. I created the config.yaml file with NotePad and, of course, novices should note they should use the yaml extention and not the txt extension. To be clear, I provided a picture of the config.yaml file.
config file

All fun ! Many thanks again and hopefully this helps people like me - who are not used to linux - to get rolling easily. Kindest regards - Jean Louis