Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 2.33 KB

README.md

File metadata and controls

33 lines (26 loc) · 2.33 KB

Requirements

Usage

  1. Update the hostPath property in all configs/**/kind.yaml files to match the path of the project on your filesystem
  2. (optional) Update the hostPort property in all configs/**/kind.yaml files to the port that suits you the best to access portainer instance. Default ports are, by context:
  • base: 9010
  • ingress: 9020
  • multi-master: 9030
  • taints: 9040
  • agent: 9050
  • edge-agent: 9060
  1. Create the cluster with ./setup.sh create <ENV> where <ENV> is the name of the subfolder inside configs folder
  2. Start Portainer in development mode via yarn start
  3. Deploy or force an update of any existing Portainer app: ./setup.sh portainer <ENV>

Open browser at localhost:<hostPort> (hostPort is defined in kind.yaml file, default values listed above)

Notes
  • Multiple clusters can run at the same time, updating portainer frontend will update all running clusters (for backend you need to use step 4 to redeploy on every cluster you want)
  • setup.sh script provides some commands to help you recreate / redeploy / delete clusters. See them with ./setup help or ./setup.sh usage
    • If you are on Windows and ./setup help gives you -bash: ./setup.sh: /bin/bash^M: bad interpreter: No such file or directory, then run sed -i -e 's/\r$//' setup.sh. Playing around with Windows & Unix line endings sometimes makes bash wonder and refuse to run the script.
  • kubernetes context for all the provided configs is kind-<CONTEXT> (e.g. kind-base for base folder, kind-ingress for ingress folder, etc)
  • You can deploy applications located inside the applications folder inside any kind environment with ./setup.sh deploy <CONTEXT> applications/<APP.YAML> where <CONTEXT> is the application context (see above) and <APP.YAML> is your application yaml file inside applications folder
  • You don't need to recreate the cluster everytime you boot ; clusters are respawned on machine boot. You may want to redeploy Portainer everytime you do a fresh build to clear all previous deployment data.
Applications
  • Enable metrics server in an environment: ./setup.sh deploy <ENV> applications/metric-server.yaml
  • Deploy a naked pod in an environment: ./setup.sh deploy <ENV> applications/pod.yaml