Skip to content

mahesh-tier1app/yc-k8-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yc-k8-test

Setup

  1. Clone repo:

    SSH - git clone git@github.com:mahesh-tier1app/yc-k8-test.git
    HTTPS - git clone https://github.com/mahesh-tier1app/yc-k8-test.git
    
    cd yc-k8-test
  2. Download license.lic and put it into this directory

Docker Image

  1. To build image:

    docker build -t ycrash .
  2. Tag and push the Docker image to Docker Hub

    docker tag ycrash <dockerhub-user>/<repo-name>:<tag-name>
    
    docker push <dockerhub-user>/<repo-name>:<tag-name>
  3. To run the container locally:

    docker run -ti --rm -p 8080:8080 --name ycrash -v $(pwd)/license.lic:/opt/workspace/yc/license.lic ycrash
  4. Then open http://localhost:8080

Kubernetes

Kubernetes manifests (yaml) resides in kubernetes/ directory.

  1. Copy kubernetes/secret.yaml.template to kubernetes/secret.yaml

    cp kubernetes/secret.yaml.template secret.yaml
    
  2. Edit kubernetes/secret.yaml and replace the license template with the real one.

  3. Change image property in the deployment.yaml to update your Docker Hub repository.

  4. Assuming you have a running kubernetes cluster and kubectl ready to access the cluster, next step is to just run:

    kubectl apply -f kubernetes -R
    
  5. There are a few ways of exposing a service in kubernetes to the outside. But for the initial scope, we can access it privately with:

    kubectl port-forward svc/yc-web 8080:8080
    
  6. Then the service should be accessible from http://localhost:8080

Notes

  • Kubernetes deployment yaml is working. It's the simplest implementation, which is easy for initial review but not yet "production ready".

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published