Deploy an Application into a New Namespace
A 6-step recipe with Kubernetes. We can help you get access.
Recipe · 6 steps
Deploy an Application into a New Namespace
with Kubernetes · Configuration & Secrets Management
Stand up a namespaced application with its config, secret, deployment, and service.
- Create the namespace that will scope every resource this workflow provisions, giving the application an isolated name and RBAC boundary.
- Write the application's non-confidential configuration into a ConfigMap so the pod template can consume it without baking values into the image.
- Store the application's credentials as an Opaque Secret using stringData, which the API server base64-encodes on write.
- Create the Deployment that runs the workload. The pod template selector matches the app label so the controller owns the pods it creates.
- Expose the deployment's pods behind a stable virtual IP and DNS name by selecting on the same app label the deployment applies to its pods.
- Read the deployment back to confirm the controller observed the spec and report how many replicas are ready and available.
What you'll need to have ready
- namespace: The namespace to create and deploy the application into.
- appName: Name applied to the ConfigMap, Secret, Deployment, and Service.
- image: Container image in [registry/]repository[:tag] form.
- replicas: Desired number of pod replicas for the deployment.
- containerPort: Port the container listens on.
- configData: Map of UTF-8 key/value pairs to store in the ConfigMap.
- secretStringData: Map of plain-text key/value pairs to store in the Secret.
- serviceType: Service type — ClusterIP, NodePort, LoadBalancer, or ExternalName.
For your developer
Arazzo workflow kubernetes:deploy-application, 6 operations: createNamespace → createNamespacedConfigMap → createNamespacedSecret → createNamespacedDeployment → createNamespacedService → getNamespacedDeployment. Specs on APIs.io.