node-skaffold-example/README.md

1.3 KiB

Node.js and skaffold example

How to get going?

  1. Change image URLs in skaffold.yaml according to your desired image registry and image name
  2. Change ingress definition in k8s/dev/application.yml:
    • Traefik's URL external-dns.alpha.kubernetes.io/target:
    • - host:
  3. Attempt to run Skaffold:
    • skaffold dev --namespace <your Kubernetes namespace> [--kube-context <your kubeconfig context, if applicable>]
  4. When working and finished, you can leave the application running:
    • copy k8s/dev/application.yml to k8s/staging/
    • run skaffold run with the same parameters as earlier

How to use harbor.codemowers.eu

  1. Log in in web browser
  2. Create a project or use one destined for you
  3. Make it public in the Configuration tab so that Kubernetes can easily download the image (do not do this for actual production applications)
  4. Create a robot account in Robot Accounts tab
    • Name the account in some way, give it some expiring date
    • Keep the modal with login open
    • Run docker login --username <robot-acc-username> --password <robot-acc-password> harbor.codemowers.eu. Beware! Harbor uses $ character in the username which bash and other shells would interpret as start of an variable. Escape it with \ , like so: docker login --username robot\$eaas+docker --password ...