If Kibana is registered with Elasticsearch and everything works with 8.1.1, then you only need to change
to image: elastic/kibana:8.1.2
and image: elastic/elasticsearch:8.1.2-amd64
. Elasticsearch and Kibana will handle any upgrades it might need to do internally.