kubectl not showing new context create in GCP

From client A, I created a new kubernetes cluster in GCP as follows: $ gcloud container clusters create my-new-cluster –num-nodes 3 From client A, I can see the new context was created: $ kubectl config get-contexts CURRENT NAME CLUSTER AUTHINFO NAMESPACE * gke_learn-k8s-261120_us-west1-b_my-new-cluster gke_learn-k8s-261120_us-west1-b_my-new-cluster gke_learn-k8s-261120_us-west1-b_my-new-cluster gke_learn-k8s-261120_us-west1-b_kubia gke_learn-k8s-261120_us-west1-b_kubia gke_learn-k8s-261120_us-west1-b_kubia minikube minikube minikube But when I go…

nginx proxy to S3 public bucket 404

I’m trying to proxy requests to an S3 bucket using the following nginx config: location /assets/(.*) { resolver 127.0.0.1; set $bucket “example.s3-us-west-2.amazonaws.com”; proxy_pass https://$bucket/${uri}; proxy_intercept_errors on; proxy_redirect off; proxy_set_header Host $bucket; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_hide_header x-amz-id-2; proxy_hide_header x-amz-request-id; } When I try to access any asset in the bucket that I know…

Disable temporally the docker container network interface

I am building a library to simulate some faults in a system. One of the faults, is to simulate a network failure, which would forbid any connection. Currently, I am using this Kotlin code to disable the container network interface: Runtime.getRuntime().exec(“ifconfig eth0 down”) // wait some time Runtime.getRuntime().exec(“ifconfig eth0 up”) When the interface is re-enabled,…

Redirect to subdomain unless query string is present (nginx)

I am trying to redirect specific subpages to a subdomain in this manner: If a query string isn’t present handle the redirect to the subdomain If a specific query string is present, don’t redirect The following handles the redirect: if ($page = “”){ return 301 https://subdomain.example.com/$1/; } try_files $uri $uri/ index.php?args; But, this does not…