I'm running a simple Kubernetes deployment descriptor with podman play kube
and some of my services need env vars to be set. In Docker Compose/Swarm I could just place the names of env-vars to the file and they would be picked up from a host OS. Alternatively, I could use .env
file with Docker Compose for this purpose. But none of these seem to work with podman. I know that Kubernetes offers ConfigMaps for this purpose, but it also doesn't seem to be implemented in podman play kube
. So what's the way of propagating OS environment variables to the container in this case, because I don't really want to explicitly hardcode the values in the .yaml
file?
Dmytro Titov's questions
We are running a stack of Docker Swarm services and, according to our Privacy Policy, we have to keep logs only for the last 6 months, but no older. I was trying to achieve it through different logging drivers, but all of them (AFAIK) work only with max file-size, but not with times/dates.
The one solution that I came up with: use json-file
logging driver and then setup logrotate.d
with rotate 180
and daily
options.
The problem, however, is that json-file
logging driver doesn't disable standard Docker logging (I mean docker logs -f ...
or docker service logs -f ...
) which uses some internal Docker storage for logs, as per documentation:
Only the
json-file
andjournald
drivers make the logs available directly fromdocker-compose up
anddocker-compose logs
. Using any other driver does not print any logs.
In this case, the rotation will work for json-file
logs, but the "internal" logs will be still kept longer.
So, I wonder, how can one achieve time-based Docker log rotation?
I have configured PuTTY for accessing my instances as described in the instruction. I have set the hostname as it's displayed in my instance dashboard - everything works great. But when I restart my instance, it's public IP address (as well as public DNS) is different (AFAIU they are being rearranged each time the instance restarts). So I have to reconfigure my connection in PuTTY. Is there any way to get some constant configuration that will work regardless changing IP address?
P.S.: I know that Elastic IP's are the solution, but I'm interested in some other options.