ISD - Commonly used Commands
Basic commands for OpsMx ISD
This document contains a list of basic commands that can be useful when working with OpsMx ISD.
Working with pods
kubectl get pods -n <namespace>
# to list down podskubectl delete po <pod-id> -n <namespace>
#for deleting the podskubectl exec -it <pod id> -n <namespace>
-- bash # for getting into the podkubectl scale deploy <deployment-name> -n <name-space> --replicas=0
#for scaling down the podskubectl scale deploy -n --replicas=1
#for scaling up the podskubectl describe pod -n
# to describe a podkubectl logs -f -n
#to get the running status of a podkubectl logs -f -n >
#to get the running status of a pod into a filekubectl apply -f <filename.yaml> -n
#to create a service/secret/job
Working with Secrets
kubectl get secrets -n
#to get all the secretskubectl get secret -n -o yaml
#to view a particular secretkubectl get secret -n -o yaml
#to edit the secretecho -n <encode/decode-content> | base64 -d/-e -w0
#to encode/decode a secretCreating platform secrets
kubectl -n get secrets oes-platform-config -o jsonpath=‘{.data.platform-local.yml}’ | base64 -d > platform-local.yml
If needed, edit the platform-local.yml file
kubectl -n delete secret oes-platform-config
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
If needed, edit the gate.yml file
kubectl -n delete secret oes-gate-config
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
If needed, edit the application.yml file
kubectl -n delete secret oes-sapor-config
kubectl -n create secret generic oes-sapor-config --from-file application.yml
Working with deployments
kubectl get deploy -n <namespace>
# to get list of all the deploymentskubectl get deploy <deployment-name> -n <namespace> -o yaml
#to view a particular deploymentkubectl edit deploy <deployment-name> -n <namespace>
#to edit a deploymentkubectl scale deploy <deployment-name> --replicas=0 -n <namespace>
#to scale-down a deploymentkubectl scale deploy <deployment-name> --replicas=1 -n <namespace>
#to scale-up a deploymentecho -n <encode/decode-content> | base64 -d/-e -w0
#to encode/decode a deployment
Working with Configmaps
kubectl get cm -n
# to get the list of all configmapskubectl get cm -n -o yaml
# to get the details of the configmapkubectl edit cm -n
# to edit the configmap
Working with services
kubectl get svc -n
# to get the list of all serviceskubectl get svc -n -o yaml
# to view a servicekubectl edit svc -n
# to edit a service
Working with the jobs
kubectl get jobs -n
# to get the list of all jobskubectl get job -n -o yaml
# to view a jobkubectl describe job -n -o yaml
# to describe a jobkubectl edit job -n
# to edit a jobkubectl delete job -n
# to delete a job
To check the ingress
kubectl get ing -n
# to get the ingress
Last updated