Services
How to interact with services running on DevZero Kubernetes
Interacting with a service
Identify the network that your device is currently on.
This will usually be the network that has current
next to it.
For example,
Here, the current network is the default
network with ID network-9f8c8bfece3b44ac97103ab79e495aa0
.
Identify the service that you would like to expose.
Get the cluster ID that is currently running your service. You can do this by either visiting DevZero Dashboard: Cluster or by running
For example,
Say, we want to use abcd dev cluster
with ID cluster-0901025e6f604624bf1296791c7b64b3
.
Access the current kubeconfig to view the resources in the cluster, or visit DevZero Dashboard: Cluster
Access the current kubeconfig to view the resources in the cluster,
Let's pick user-store
that's running in the default
namespace, and listening on port 8080
.
Set up the operator to expose services.
Expose the service on that network.
Then, get its URL
Interact with the service.
Developing/testing a service
This assumes the reader has gone through the steps in the previous section.
Say, this is currently the dependency graph for the services running in the cluster.
If the user is working on user-store
, they can either:
- build a new container image and deploy it into the cluster to see it working end-to-end (slower)
- reroute traffic for the
user-store
service to their instance ofuser-store
running in the workspace or laptop (faster)
Intercept
For interception ([2] in list above), run:
where <target network ip>
is either your laptop or your workspace.
For example,
To get the network IPs,
If your version of user-store
is running on abcdsmits-air-zi36pvqw
, run
Restore
To restore the state for the user-store
service to make it point to the version deployed on the cluster:
Exposing a service to the public internet
We are currently working with design partners on supporting this experience. If you would like to participate, please send an email to support@devzero.io, or visit https://devzero.io/dashboard and click the "chat" icon in the bottom right-hand side of your browser window.