Git Product home page Git Product logo

k8s-manifests-monorepo's Introduction

K8s Manifests

This monorepo contains the kubernetes objects needed to deploy bk-rest-app

Set Aliases

alias k=kubectl
alias kp="kubectl get pods"
alias kd="kubectl describe"
alias ks="kubectl get services"

Step 1: Matrics Server

This will allow us to get the resource consumption from cli

k apply -f metrics-server/metrics-server.yaml

Step 2: Deploy Postgres in NodePort svc

  • Create PV and PVC k apply -f postgres/postgres-pvc-pv.yaml

  • Create ConfigMap for Postgres service

    • Update the data parameter at postgres/postgres-config.yaml then apply
      `k apply -f postgres/postgres-config.yaml`
  • Deploy Postgres

      `k apply -f postgres/postgres-deployment.yaml`
    • watch the process with kp --watch
  • Expose Postgres within Nodes

      `k apply -f postgres/postgres-service.yaml`
    • verify with ks

Step 3: Configure External DNS (CloudFlare)

  • We need to get CloudFlare API KEY and Email

  • Update the env at dns/external-dns.yaml then

      `k apply -f dns/external-dns.yaml`
    • verify with kp --watch

Step 4: Deploy the bk-app

  • Update the ConfigMap for postgres and application specific env vars at bk-rest-app/bk-app-config.yaml

      `k apply -f bk-rest-app/bk-app-config.yaml`
    • verify with k get cm
  • Create docker registry secret

    • Here I have used my private registry, so the dockerconfigjson was omitted. You can use any public registry or private ones.
      • Generate and create the docker-registry secret with imperative command

          k create secret docker-registry registry.sabbir.dev --docker-username=<username> --docker-password=<password> --docker-server=registry.sabbir.dev --dry-run=client -o yaml
      • Replace <username> and <password> with the target registry credential.

  • Deploy App

      `k apply -f bk-rest-app/bk-app-deployment.yaml`

    verify with- kp --watch

  • Expose application globally

    • Edit the externalIPs and annotations then run-
      `k apply -f bk-rest-app/bk-svc.yaml`

k8s-manifests-monorepo's People

Contributors

by-sabbir avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.