Customer custom attribute not showing in admin form

In contrast to Magento 1, in Magento 2 you now need to add some XML to make custom attributes appear in the edit customer section of the admin.

Create YourNamespace/YourModule/view/base/ui_component/customer_form.xml and add this (at a minimum):

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="customer">
        <field name="{{YOUR_ATTRIBUTE_CODE}}" formElement="input">
            <settings>
                <visible>true</visible>
            </settings>
        </field>
    </fieldset>
</form>

Replace {{YOUR_ATTRIBUTE_CODE}} with the attribute code from your upgrade script.

Run php -f bin/magento setup:upgrade and then you're good to go.