Yes,
If you have only one interface for uplink, you need to configure it as a trunk (If you have multiple VLAN’s in your environment).
Something like this (is a minimal config):
!
interface GigabitEthernet1/0/24
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10,20,30,40,50
switchport mode trunk
!
Samuel Petrescu