Using waypoint
on your local machine via minikube
is not that hard, but there are a few extra steps if:
minikube
(this may be an issue with kind
too) and make sure container images are available. The Hashicorp docs are written assuming kind
. I have not actually tested it out so I do not know if the things I had to do for minikube like enabling ingress or the eval to get minikube docker-env stuff set up are things that kind
just does, or there are analagous commands you would need for itSetting things up as described below will give you a standalone waypoint configuration on your local machine via minikube
without using the external URL service but with the ability to access services you deploy from the host.
homewbrew
to do thatminikube start --kubernetes-version=v1.19.2
. Replace with a specific/current/later version in the future if you want it, and especially after 1.19.2 is no longer supportedminikube
ingress capability enabled so that exposing your waypoint
service to the host works: minikube addons enable ingress
This was the critical missing step for me.
You must run eval $(minikube docker-env)
This will point your minikube
k8s cluster's configuration to docker's local registry to pull container images from. Without that, waypoint
will not work right on minikube
. When you see ImagePull
errors on waypoint deploy
or waypoint up
attempts that is your indication that you have forgotten this step..
waypoint
executable installed, as shown in their documentation, which on OSX is via homebrew
.db
files you see in their instructions for running the server manually via waypoint server run ...
waypoint server run -db=waypoint-k8s.db -url-enabled=false &
. The name for the db files is arbitrary. I used waypoint-k8s
so that if I wanted to have alternate configurations like only docker or aks or ecs I could do it easily enoughwaypoint server bootstrap
command that gets output by the waypoint server run ...
command, and execute it (copy and paste is nice here!). On my machine the command that came up was waypoint server bootstrap -server-addr=127.0.0.1:9701 -server-tls-skip-verify
but yours may be differentI used the nodejs example app that Hashicorp distributes for waypoint
. It has a kubernetes
flavor. These steps should get the sample nodejs app up and running:
kind
and bootstrapping waypoint
itselfkind
and it will work just fine.Once your app is deployed for the first time, if you want it accessible outside your minikube
k8s cluster, you can use k8s ingress to expose it to the host machine. To do that, assuming the waypoint service you deployed was named example-nodejs
you would issue the following command:
echo "apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-nodejs-ingress
spec:
defaultBackend:
service:
name: example-nodejs
port:
number: 80" | kubectl apply -f -
Replace example-nodejs
with whatever you did name your service if you did give it a different name.
Find the ip address of your minikube
cluster via minikube ip
. Your service should be available via http over that IP address (on port 80).
You will need to do this before you can waypoint destroy
your waypoint-based service
kubectl delete ingress example-nodejs-ingress
Gets rid of the ingress named example-nodejs-ingress
as used in the section above. If you named your ingress differently when you created it, use whatever name you used intead.