Interacting with the deployment

The code to interact with the deployment is simpler than the Python example, utilizing the Kubernetes client and the proxy:

describe('should interact with the deployed services', function() {  // path to access the port through the kubectl proxy:  // http://localhost:8001/api/v1/namespaces/default/services/nodejs-service:web/proxy/ it('should access by pod...', function() {   return k8sApi.proxyGETNamespacedServiceWithPath("nodejs-service:web", "default", "/")   .then(function(res) {      // console.log(util.inspect(res,{depth:1}));      expect(res.body).to.not.be.null;    });  })}) // interact with the deployed services

In this branch, I changed the code running from a stateful set to a deployment, as getting proxy access to ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.