Skip to content

Workload CRUD-operations

This guide shows you how to perform CRUD-operations on your workload.

Prerequisites

Create/apply the application spec

kubectl apply -f nais.yaml --namespace=<MY-TEAM> --context=<MY-ENV>

Verify that the application was successfully created by running describe on the Application:

kubectl describe app <MY-APP>

The events will tell you if the application was successfully created or not.

Read/list your applications

kubectl get application --namespace=<MY-TEAM> --context=<MY-ENV>

Update/edit your application

kubectl edit application <MY-APP> --namespace=<MY-TEAM> --context=<MY-ENV>

Delete your application

kubectl delete application <MY-APP> --namespace=<MY-TEAM> --context=<MY-ENV>

Create/apply the naisjob spec

kubectl apply -f nais.yaml --namespace=<MY-TEAM> --context=<MY-ENV>

Verify that the naisjob was successfully created by running describe on the Naisjob:

kubectl describe naisjob <MY-NAISJOB>

The events will tell you if the naisjob was successfully created or not.

Read/list your naisjobs

kubectl get naisjob --namespace=<MY-TEAM> --context=<MY-ENV>

Update/edit your naisjob

kubectl edit naisjob <MY-NAISJOB> --namespace=<MY-TEAM> --context=<MY-ENV>

Delete your naisjob

kubectl delete naisjob <MY-NAISJOB> --namespace=<MY-TEAM> --context=<MY-ENV>