Packages:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: networking.k8s.io/v1 | |
| kind: NetworkPolicy | |
| metadata: | |
| name: allow-certmanager-solver | |
| namespace: kasten | |
| spec: | |
| ingress: | |
| - from: | |
| - namespaceSelector: {} | |
| podSelector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://www.digitalocean.com/community/questions/how-do-you-clone-a-persistentvolumeclaim-in-kubernetes | |
| https://kubernetes.io/docs/concepts/storage/volume-snapshots/ | |
| https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-snapshot-and-restore-volume-from-snapshot-support | |
| https://www.youtube.com/watch?v=bo21p0c7j9o | |
| https://github.com/HoussemDellai/docker-kubernetes-course/tree/main/14_cluster_backup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://dba.stackexchange.com/questions/154464/mongodb-replication-going-into-maintenance-mode-with-10333-other-maintenance-mo | |
| // db.adminCommand({replSetMaintenance: 1}) | |
| [ReplicationExecutor] going into maintenance mode with 0 other maintenance mode tasks in progress | |
| [ReplicationExecutor] transition to RECOVERING | |
| // db.adminCommand({replSetMaintenance: 1}) | |
| [ReplicationExecutor] going into maintenance mode with 1 other maintenance mode tasks in progress | |
| // db.adminCommand({replSetMaintenance: 0}) | |
| [ReplicationExecutor] leaving maintenance mode (1 other maintenance mode tasks ongoing) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl delete sts sts --cascade=false # keep pods running | |
| kubectl -f sts.yaml create | |
| kubectl patch pvc sts-sts-0 -p '{ "spec": { "resources": { "requests": { "storage": "15Gi" }}}}' | |
| https://itnext.io/k8s-raise-statefulset-volume-size-with-low-impact-33fe1e2576f6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package problem; | |
| import com.tietoevry.quarkus.resteasy.problem.HttpProblem; | |
| import javax.ws.rs.GET; | |
| import javax.ws.rs.Path; | |
| import javax.ws.rs.core.Response; | |
| @Path("/hello") | |
| public class HelloResource { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #echo $totalmem | |
| totalmempro=$(printf "%.0f\n" $totalmem) | |
| echo Total Memory in Gb = $totalmempro | |
| memusage=$(free | awk '/Mem/{printf("RAM Usage: %.2f%\n"), $3/$2*100}' | awk '{print $3}') | |
| echo Memory Usage in % = $memusage | |
| memfree=$(free -mh | sed -n 2p | awk '{print $4}' | sed 's/\G//g') | |
| echo Memory free in Gb = $memfree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bitnami/nginx-ingress-controller | |
| https://github.com/bitnami/charts/tree/master/bitnami/nginx-ingress-controller | |
| helm install nginx-ingress stable/nginx-ingress --set controller.publishService.enabled=true | |
| #https://bobcares.com/blog/nginx-ingress-on-digitalocean-kubernetes-using-helm/ | |
| kubectl describe -A ValidatingWebhookConfiguration ingress-nginx-admission > ValidatingWebhookConfiguration.yaml | |
| kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //https://stackoverflow.com/questions/18731603/how-to-tar-certain-file-types-in-all-subdirectories | |
| find ./someDir -name "*.php" -o -name "*.html" | tar -cf my_archive -T - | |
| Easy with zsh: | |
| tar cvzf foo.tar.gz **/*.(php|html) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jenkins: | |
| systemMessage: "Welcome to Jenkins " | |
| jobs: | |
| - script: > | |
| pipelineJob('configuration-as-code') {} | |
| unclassified: | |
| location: | |
| url: "http://localhost:8080/" |