Refactored syntax highlighting shortcodes into markdown
This commit is contained in:
parent
9e6bb1a3e5
commit
ea435049b3
71 changed files with 297 additions and 297 deletions
|
@ -14,7 +14,7 @@ My use case is to deploy a wildcard certificate that was previously handled by a
|
|||
## The solution
|
||||
|
||||
Assuming we are working with a secret named `wild.adyxax.org-cert` and our namespace is named `legacy` :
|
||||
{{< highlight sh >}}
|
||||
```sh
|
||||
kubectl -n legacy get secret wild.adyxax.org-cert -o json -o=jsonpath="{.data.tls\.crt}" | base64 -d > fullchain.cer
|
||||
kubectl -n legacy get secret wild.adyxax.org-cert -o json -o=jsonpath="{.data.tls\.key}" | base64 -d > adyxax.org.key
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
|
|
@ -11,21 +11,21 @@ tags:
|
|||
## Dumping
|
||||
Assuming we are working with a postgresql statefulset, our namespace is named `miniflux` and our master pod is named `db-postgresql-0`, trying to
|
||||
dump a database named `miniflux`:
|
||||
{{< highlight sh >}}
|
||||
```sh
|
||||
export POSTGRES_PASSWORD=$(kubectl get secret --namespace miniflux db-postgresql \
|
||||
-o jsonpath="{.data.postgresql-password}" | base64 --decode)
|
||||
kubectl run db-postgresql-client --rm --tty -i --restart='Never' --namespace miniflux \
|
||||
--image docker.io/bitnami/postgresql:11.8.0-debian-10-r19 --env="PGPASSWORD=$POSTGRES_PASSWORD" \
|
||||
--command -- pg_dump --host db-postgresql -U postgres -d miniflux > miniflux.sql-2020062501
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
## Restoring
|
||||
|
||||
Assuming we are working with a postgresql statefulset, our namespace is named `miniflux` and our master pod is named `db-postgresql-0`, trying to
|
||||
restore a database named `miniflux`:
|
||||
{{< highlight sh >}}
|
||||
```sh
|
||||
kubectl -n miniflux cp miniflux.sql-2020062501 db-postgresql-0:/tmp/miniflux.sql
|
||||
kubectl -n miniflux exec -ti db-postgresql-0 -- psql -U postgres -d miniflux
|
||||
miniflux=# \i /tmp/miniflux.sql
|
||||
kubectl -n miniflux exec -ti db-postgresql-0 -- rm /tmp/miniflux.sql
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
|
|
@ -10,11 +10,11 @@ tags:
|
|||
## The solution
|
||||
|
||||
On a single node cluster, control plane nodes are tainted so that the cluster never schedules pods on them. To change that run :
|
||||
{{< highlight sh >}}
|
||||
```sh
|
||||
kubectl taint nodes --all node-role.kubernetes.io/master-
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
||||
Getting dns in your pods :
|
||||
{{< highlight sh >}}
|
||||
```sh
|
||||
add --cluster-dns=10.96.0.10 to /etc/conf.d/kubelet
|
||||
{{< /highlight >}}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue