Skip to content

mscerri/kong-openshift

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KONG ➕ Openshift Deployment

Kong can easily be provisioned to Openshift cluster using the following steps:

  1. Initial setup

    Install hi-cli and hi-heketi

    bash -c "$(curl -fsSL https://raw.githubusercontent.com/hi-cli/hi-cli/master/bin/install/init)"
    
    hi package install heketi
    

    Download or clone the following repo:

    git clone https://github.com/john-deng/kong-openshift.git
    cd kong-openshift    

    Create Openshift Project and edit supplemental-group and uid-range

    oc new-project gateway-dev
    
    oc edit ns gateway-dev

    =>

    Edit hi.conf, modify heketi_password and heketi_cli_server

    vim hi.conf

    Create PV and PVC

    hi heketi create pv size=4 pvc name=kong-database-claim uid=26

    Check if pvc is created

    oc get pvc

    Enable Container Images that Require Root

    oc adm policy add-scc-to-user anyuid system:serviceaccount:gateway-dev:default

    Deploy Kong

    oc process -f kong-template.yaml -v PROJECT_NAME=gateway-dev -v KONG_DASHBOARD_PASSWORD=password | oc create -f -

    The last step, expose service

    oc expose svc/kong-dashboard
    
    oc expose svc/kong-admin
    
    oc expose svc/kong-proxy
  2. Usage

    Scale up Kong

    Open Kong dashboard, after exposed svc/kong-dashboard, you should able to open dashboard on your web browser.

    Setting Kong node URL

    Add API to gateway

    Assume that you've deployed the spring-boot app 'appname' which expose port 8080, then fill below form and proess SAVE button.

    Now, let's check the api

    http http://kong-proxy-gateway-dev.172.16.5.95.nip.io/projectname/appname/api/health

About

KONG + Openshift Deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%