# ISD - Commonly used Commands

## B**asic commands for OpsMx ISD**

**This document contains a list of basic commands that can be useful when working with OpsMx ISD.**

1. &#x20;**Working with pods**
   * `kubectl get pods -n <namespace>` # to list down pods
   * `kubectl delete po <pod-id> -n <namespace>` #for deleting the pods
   * `kubectl exec -it <pod id> -n <namespace>` -- bash # for getting into the pod
   * `kubectl scale deploy <deployment-name> -n <name-space> --replicas=0` #for scaling down the pods
   * `kubectl scale deploy -n --replicas=1` #for scaling up the pods&#x20;
   * `kubectl describe pod -n` # to describe a pod&#x20;
   * `kubectl logs -f -n` #to get the running status of a pod&#x20;
   * `kubectl logs -f -n >` #to get the running status of a pod into a file&#x20;
   * `kubectl apply -f <filename.yaml> -n` #to create a service/secret/job
2. **Working with Secrets**
   * `kubectl get secrets -n` #to get all the secrets&#x20;
   * `kubectl get secret -n -o yaml` #to view a particular secret&#x20;
   * `kubectl get secret -n -o yaml` #to edit the secret&#x20;
   * `echo -n <encode/decode-content> | base64 -d/-e -w0` #to encode/decode a secret
   * Creating platform secrets

     * `kubectl -n get secrets oes-platform-config -o jsonpath=‘{.data.platform-local.yml}’ | base64 -d > platform-local.yml`&#x20;

     If needed, edit the platform-local.yml file&#x20;

     * `kubectl -n delete secret oes-platform-config`&#x20;
     * `kubectl -n create secret generic oes-platform-config --from-file platform-local.yml`
   * Creating gate secrets

     * `kubectl -n get secrets oes-gate-config -o jsonpath=‘{.data.gate.yml}’ | base64 -d > gate.yml`&#x20;

     If needed, edit the gate.yml file&#x20;

     * `kubectl -n delete secret oes-gate-config`&#x20;
     * `kubectl -n create secret generic oes-gate-config --from-file gate.yml`
   * Creating sapor secrets

     * `kubectl -n get secrets oes-sapor-config -o jsonpath='{.data.application.yml}' | base64 -d > application.yml`&#x20;

     If needed, edit the application.yml file&#x20;

     * `kubectl -n delete secret oes-sapor-config`&#x20;
     * `kubectl -n create secret generic oes-sapor-config --from-file application.yml`
3. **Working with deployments**
   * `kubectl get deploy  -n <namespace>` # to get list of all the deployments
   * `kubectl get deploy  <deployment-name> -n <namespace> -o yaml` #to view a particular deployment
   * `kubectl edit deploy <deployment-name> -n <namespace>` #to edit a deployment
   * `kubectl scale deploy <deployment-name> --replicas=0  -n <namespace>` #to scale-down a deployment
   * `kubectl scale deploy <deployment-name> --replicas=1  -n <namespace>` #to scale-up a deployment
   * `echo -n <encode/decode-content> | base64 -d/-e -w0` #to encode/decode a deployment
4. **Working with Configmaps**
   * `kubectl get cm -n` # to get the list of all configmaps&#x20;
   * `kubectl get cm -n -o yaml` # to get the details of the configmap&#x20;
   * `kubectl edit cm -n` # to edit the configmap
5. **Working with services**
   * `kubectl get svc -n` # to get the list of all services&#x20;
   * `kubectl get svc -n -o yaml` # to view a service&#x20;
   * `kubectl edit svc -n` # to edit a service
6. **Working with the jobs**
   * `kubectl get jobs -n` # to get the list of all jobs&#x20;
   * `kubectl get job -n -o yaml` # to view a job&#x20;
   * `kubectl describe job -n -o yaml` # to describe a job&#x20;
   * `kubectl edit job -n` # to edit a job&#x20;
   * `kubectl delete job -n` # to delete a job
7. **To check the ingress**
   * `kubectl get ing -n` # to get the ingress


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opsmx.com/opsmx-1/opsmx-context-engine/additional-resources/previous-releases/isd-3.12/opsmx-intelligent-software-delivery-platform/opsmx-isd-installation/isd-commonly-used-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
