/OKE-EFK

Creating a kubernetes cluster in OCI. Deploying Elasticsearch-Fluentd-Kibana on the cluster through terraform.

Primary LanguageHCL

OKE EFK terraform scripts

Deploys the whole solution in 15 minutes or less. Including OKE Cluster, Node Pools, helm charts, Services to Kubernetes and applications


Steps (Using Terraform and OCI CloudShell)

(If not using OCI CloudShell, you need to have the terraform, OCI cli and kubectl installed and configured on workstation that will be used)
  1. Create a folder for the Terraform scripts: e.g.: mkdir oke-efk && cd oke-efk
  2. Get the project: https://github.com/mrabhiram/OKE-EFK.git
  3. Unzip. e.g.: unzip OKE-EFK.zip
  4. Copy the file terraform.tfvars.example to terraform.tfvars and update the tenancy_ocid and compartment_ocid variables cp terraform.tfvars.example terraform.tfvars
  5. Run the command terraform init to init the Terraform and providers
  6. Run the command terraform apply to deploy everything.
    • Takes near 8 min for the OKE cluster be deployed
    • Takes near 5 min to run the app deployment scripts, after the OKE cluster is ready

Steps (Using OCI Console UI and Resource Manager)

  1. Download the stack from here: (https://github.com/mrabhiram/OKE-EFK.git)
  2. Open the Resource Manager on the OCI Console. e.g.: https://console.us-ashburn-1.oraclecloud.com/resourcemanager/stacks/create
  3. Drag-and-Drop the OKE-EFK.zip, optionally set any variables needed and click Create
  4. Select "Terraform Apply"
    • Takes near 8 min for the OKE cluster be deployed
    • Takes near 5 min to run the app deployment scripts, after the OKE cluster is ready

Accessing the new OKE cluster created

  1. Go to the project folder (e.g.: cd cloud.poc.tf.oracle5gaware)
  2. Run the command export KUBECONFIG=./generated/kubeconfig to use the kubeconfig for the created cluster
  3. Run the command kubectl get pods --all-namespaces to to see all the pods created

Accessing the logs (Kibana)

  1. Run the command kubectl get svc -n occne-infra o5g-efk-kibana-logging to get the EXTERNAL-IP of the kibana loadbalancer.
  2. Open the browser and point to <EXTERNAL_IP> to open the kibana ui.