Can you pass an environment variables into kubectl exec without bash -c?

/usr/bin/env exports values passed in key=value pairs into the environment of any program it’s used to invoke. kubectl -n nmspc exec “$POD” — env curIP=123 script01 Note that you should never use $runScript or any other unquoted expansion to invoke a shell command. See BashFAQ #50 — I’m trying to put a command in a … Read more

Kubernetes PVC with ReadWriteMany on AWS

Using EFS without automatic provisioning The EFS provisioner may be beta, but EFS itself is not. Since EFS volumes can be mounted via NFS, you can simply create a PersistentVolume with a NFS volume source manually — assuming that automatic provisioning is not a hard requirement on your side: apiVersion: v1 kind: PersistentVolume metadata: name: … Read more

Kubernetes Ingress non-root path 404 Not Found

Your ingress definition creates rules that proxy traffic from the {path} to the {backend.serviceName}{path}. In your case, I believe the reason it’s not working is that /app is proxied to app-service:80/app but you’re intending on serving traffic at the / root. Try adding this annotation to your ingress resource: nginx.ingress.kubernetes.io/rewrite-target: / Source: https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/rewrite

How do I add an intermediate SSL certificate to Kubernetes ingress TLS configuration?

If you add multiple certificates in tls.cert key in Kubernetes TLS Ingress Configuration. Please do this like this —–BEGIN CERTIFICATE—– <put your certificate value in a single line > —–END CERTIFICATE—– —–BEGIN INTERMEDIATE CERTIFICATE—– <put your certificate value in a single line> —–END INTERMEDIATE CERTIFICATE—– Otherwise, you’ll get an error in ssl cert chain validation. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)