There are no items in your cart
Add More
Add More
Item Details | Price |
---|
top
or htop
to identify memory-consuming processesps aux --sort=-%mem
to sort processes by memory usagefree -m
to verify swap usage and available memoryecho 1000 > /proc/[PID]/oom_adj
pmap
to examine memory allocation per processaws ec2 attach-volume --volume-id vol-xxxxx --instance-id i-xxxxx --device /dev/sdf
sudo mkdir /mnt/recovery sudo mount /dev/xvdf1 /mnt/recovery
sudo cp -r /mnt/recovery/path/to/critical/data /home/ec2-user/recovered-data
aws s3 cp /home/ec2-user/recovered-data s3://my-backup-bucket/ --recursive
pipeline
block and requires specific sections like agent
, stages
, steps
Scripted Pipeline:groovypipeline { agent any stages { stage('Build') { steps { sh 'mvn clean package' } } } }
node
blockIn our AI application pipeline, I used declarative for most standard deployment workflows but scripted pipelines for complex model training pipelines that required custom logic and dynamic resource allocation.groovynode { stage('Build') { try { sh 'mvn clean package' } catch (Exception e) { currentBuild.result = 'FAILURE' } } }
vars/
: Contains global variables/functions used in pipelinessrc/
: Houses Java/Groovy classes for complex logicresources/
: Stores non-Groovy files like JSON templatesgroovy// vars/standardBuild.groovy def call(Map config) { sh "docker build -t ${config.imageName} ." sh "docker tag ${config.imageName} ${config.registry}/${config.imageName}:${config.version}" sh "docker push ${config.registry}/${config.imageName}:${config.version}" }
groovy// vars/securityScan.groovy def call(String imageName) { sh "trivy image ${imageName} --severity HIGH,CRITICAL" }
groovy// vars/deployToK8s.groovy def call(String environment, String appName, String version) { sh "helm upgrade --install ${appName} ./charts/${appName} --set image.tag=${version} -n ${environment}" }
groovy// vars/notifyBuildStatus.groovy def call(String status) { // Logic to send appropriate notifications }
kubectl get pod <pod-name> -n <namespace> kubectl describe pod <pod-name> -n <namespace>
# Current logs kubectl logs <pod-name> -n <namespace> # Previous container logs if it's crashed kubectl logs <pod-name> -n <namespace> --previous
kubectl describe node <node-name>
yamllivenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3
yamlreadinessProbe: httpGet: path: /ready port: 8080 initialDelaySeconds: 15 periodSeconds: 5
startupProbe: httpGet: path: /startup port: 8080 failureThreshold: 30 periodSeconds: 10
<service-name>.<namespace>.svc.cluster.local
api-service.namespaceB.svc.cluster.local:8080
yamlapiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: kubernetes.io/ingress.class: alb spec: rules: - host: api.aiapp.example.com http: paths: - path: / pathType: Prefix backend: service: name: api-gateway port: number: 80
AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG=true
kubectl set env daemonset aws-node -n kube-system ENABLE_PREFIX_DELEGATION=true
maxPods
per node to maximize IP utilizationyamlapiVersion: apps/v1 kind: DaemonSet metadata: name: node-exporter namespace: monitoring spec: selector: matchLabels: app: node-exporter template: metadata: labels: app: node-exporter spec: hostNetwork: true containers: - name: node-exporter image: prom/node-exporter:v1.3.1 ports: - containerPort: 9100 name: metrics volumeMounts: - name: proc mountPath: /host/proc readOnly: true - name: sys mountPath: /host/sys readOnly: true volumes: - name: proc hostPath: path: /proc - name: sys hostPath: path: /sys
yamlscrape_configs: - job_name: 'kubernetes-nodes' kubernetes_sd_configs: - role: node relabel_configs: - source_labels: [__address__] regex: '(.*):10250' replacement: '${1}:9100' target_label: __address__ action: replace
kubernetes.namespace: "app-namespace" AND log: "error" AND kubernetes.pod.name: "app-*"
kubectl logs <pod-name> -n <namespace> --tail=100
kubectl get endpoints <service-name> -n <namespace>
kubectl exec -it <pod-name> -n <namespace> -- /bin/bash
Bhavani prasad
A California-based travel writer, lover of food, oceans, and nature.