In drupal 8 it's quite easy to create tabs in admin configuration pages. Instead of writing junk of codes we can do it easily by define settings inside a simple YML config file.
Create mycustommodule.links.task.yml file and put it inside your module's root directory and define your configuration like below.
Before configuring tabs you must have defined your route and links in mycustommodule.routing.yml and mycustommodule.links.menu.yml.