Didn't get the idea of creating sub interfaces on the switch itself. You normally creat a VLAN and then assign a range of interfaces from the switch to it. That creates the VLAN. Then you give a default IP address to that VLAN itself so that the PCs belonging to that VLAN are able to do management of that switch.
The sub interace that needs to be created is on the router interface with which the switch interacts. That's where you need to tell the router that it will be expecting data from x number of VLANs.
The default gateway of any switch needs to the IP address of the outer interface with which the switch interacts. That would help individual VLANs to be able to ping each other.
Picking pebbles on the shore of the networking ocean