Skip to content

Latest commit

 

History

History
110 lines (74 loc) · 1.83 KB

File metadata and controls

110 lines (74 loc) · 1.83 KB

Kubernetes

Requirements

Please, run the following command before proceed in order to check if your system meets the requirements.

./bin/requirements.sh

Running it locally with k3d

Using k3d to orchestrate Kubernetes for development purposes.

Download k3d

wget -q -O - https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash

Creating a new single-node cluster

k3d create --api-port 6550 --publish 8081:80 --workers 2

Set the cluster config to kubeconfig

export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"
kubectl cluster-info

Run the setup (to install helm charts, etc...)

make cluster-setup

If you want to check the API grab the password

cat $(k3d get-kubeconfig) | grep password

Acessing https://localhost:6550/ using the password above and the user admin you should be able to see something like:

{
  "paths": [
    "/api",
    "/api/v1",
    "/apis",
    "/apis/"
  ]
}

K8s' environment setup

PS: From now on all the commands must be executed from our app k8s/ dir

  • Apply the manifests

Create them all

make apply-manifests
  • Make sure all of them were created right
make inspect-components
  • Verify if all deployment's pods are running and healthy
make get-pods
  • Verify pod logs
stern boilerplate --tail 20

Now you should be able to access in your browser:

http://localhost:8081/graphiql
  • Cleanup the cluster
k3d delete

Elasticsearch and Kafka

These are probably the most complex components on our boilerplate projects. If you want to run the full project including these components follow the steps: