custom route URL to custom node by Node ID #

 /*Upgrade Button for view*/
      if($statuses['floater']) {
        $options = ['absolute' => TRUE];
        $url2 = \Drupal\Core\Url::fromRoute('entity.node.canonical', ['node' => 67], $options);
        $url2->setOptions(['attributes' => ['class' => ['btn']]]);
        $upgradebut = Link::fromTextAndUrl(t('Upgrade'), $url2);
      }

 

 

Creates a button