Kubernetes Deployment

Number of APIs: 6

Variables

Required to access the Kubernetes server and the resource server that will run in the CI/CD pipeline.

  • kubeBaseUrl - The URL for Kubernetes. If you're testing locally, you should have kube proxy running, and the URL should be http://localhost:8001. If you're running this collection in Kubernetes, the URL should be https://kubernetes.default.svc.
  • kubeNamespace - The default namespace to create/update resources. If the resource has a metadata.namespace field, that takes precedence.
  • resourceBaseUrl - The URL to the service that will run in your CI/CD environment. It can return resources that can be deployed (e.g., deployment and service YAML files stored in your code repository).
  • fieldManager - Kubernetes server-side apply requires field management.
  • forceUpdates - Only needed if resources were previously created/updated by something other than Qodex, such as kubectl. More information here: Server-Side Apply.

Only required when running in Qodex. Otherwise, these are set when running Newman.

  • apiId
  • apiVersionId
  • schemaId
  • QodexAPIKey

Stored at collection level to assist with running requests individually, outside a Collection Runner or Newman. You shouldn't have to set these manually.

  • findResourceDefinitionIndex
  • currentKubeAPIResource
  • currentKubeResource
  1. Initialize - Only Run in Qodex App GET https://postman-echo.com/delay/0

  2. Run-Prepare Kubernetes Resources - Fetch Application Resources GET {{resourceBaseUrl}}/resources

  3. Run-Deploy to Kubernetes - Find Resource Definition GET {{kubeBaseUrl}}/{{apiRoot}}/{{apiGroupVersion}}

  4. Run-Deploy to Kubernetes - Fetch Resource List GET {{kubeBaseUrl}}/{{apiRoot}}/{{resourceListPath}}

  5. Run-Deploy to Kubernetes - Create Kubernetes Resource POST {{kubeBaseUrl}}/{{apiRoot}}/{{resourcePath}}

  6. Run-Deploy to Kubernetes - Update Kubernetes Resource PATCH {{kubeBaseUrl}}/{{apiRoot}}/{{resourcePath}}?fieldManager={{fieldManager}}&force={{forceUpdates}}