mercredi 2 mars 2022
mardi 18 janvier 2022
GCP GKE VPN to on premises
Once we needed to consult an on-prem MS SQL from our PHP Lumen microservices.
Following the steps described in the following articles.
https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent
Then change to false to not mask links and publish them to the firewall.
masqLinkLocal: false
mercredi 29 décembre 2021
Oracle Cloud Route traffic between tenancies
With Oracle Cloud Infrastructure OCI, you can easily route traffic between tenancies using DRG and VCN attachments.
Check my blog on Oracle.com
mercredi 27 octobre 2021
Use GCP and gsutil to backup your archive files
I have the case of an old server, still running but already past the end of life. I needed to archive vzdump backups and virtual machine images just in case.
OS is too old to install GCP tools like gcloud and gsutil, but there is curl. So I can archive my files.
From my laptop, I can get my access token once the login is confirmed.
gcloud auth application-default login
gcloud auth application-default print-access-token
You received in response the access token to use with curl to upload the file to mybucket in Google Object Storage.
curl -v --upload-file vzdump-qemu-2210-2020_09_27-14_31_04.vma.gz -H "Authorization: Bearer access-token" https://storage.googleapis.com/mybucket/vzdump-qemu-2210-2020_09_27-14_31_04.vma.gz
Replace access-token and mybucket with your values.
This way, I can externalize my backups and even try to provision some old machines as VM. Stay tuned.
mercredi 21 juillet 2021
Kubectl plugins the easy way
You know kubectl is today the Cloud console tool, the new SSH and bash and much more.
I use it every day and as always I only rely on my bash history and CTRL+R to find the last correct use.
For a long time, I read Ahmet Alp Balkan tweets about kubectl plugin but it sounds difficult.
Kubernetes the hard way, right?😁
(if you don't already follow Ahmet on Twitter)
So I was happy with my kubectl history until I assist to Paris Containers Day, especially
Gaëlle Acas & Aurélie Vache's presentation check their video Kubectl plugin in a minute ! (in french)Incroyable, it's super easy to create your kubectl plugin and they demonstrate in 4 steps :
- Create a file named kubectl-myfantasticplugin
- Make it executable, chmod +x kubectl-myfantasticplugin
- Move it into your PATH, mv kubectl-myfantasticplugin /usr/local/bin
- Run "kubectl myfantasticplugin"
- copy kubectl-halloween bash script from their Github,
- chmod +x kubectl-halloween
- sudo mv kubectl-halloween /usr/local/bin/kubectl-halloween
- kubectl halloween pod
- Get your emoji
vendredi 12 juin 2020
Google Cloud Tweak Ingress and Healthcheck
mercredi 10 juin 2020
Automate backup Google Cloud CoudSQL
Databases to be exported.
MySQL instances: If fileType is SQL and no database is specified, all databases are exported, except for the mysql system database. If fileType is CSV, you can specify one database, either by using this property or by using the csvExportOptions.selectQuery property, which takes precedence over this property.
PostgreSQL instances: You must specify one database to be exported. If fileType is CSV, this database must match the one specified in the csvExportOptions.selectQuery property.