k8s | ||
.dockerignore | ||
.gitignore | ||
Dockerfile | ||
package.json | ||
README.md | ||
server.js | ||
skaffold.yaml |
Node.js and skaffold example
How to get going?
- Change
image
URLs inskaffold.yaml
according to your desired image registry and image name - Change
ingress
definition ink8s/dev/application.yml
:- Traefik's URL
external-dns.alpha.kubernetes.io/target:
- host:
- Traefik's URL
- Attempt to run Skaffold:
skaffold dev --namespace <your Kubernetes namespace> [--kube-context <your kubeconfig context, if applicable>]
- When working and finished, you can leave the application running:
- copy
k8s/dev/application.yml
tok8s/staging/
- run
skaffold run
with the same parameters as earlier
- copy
How to use harbor.codemowers.eu
- Log in in web browser
- Create a project or use one destined for you
- Make it public in the
Configuration
tab so that Kubernetes can easily download the image (do not do this for actual production applications) - 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 ...