public static function InClusterConfig()
    {
        $config = new Config();
        $config->setToken(file_get_contents('/var/run/secrets/kubernetes.io/serviceaccount/token'));
        $config->setCertificateAuthorityPath('/var/run/secrets/kubernetes.io/serviceaccount/ca.crt');
        $config->setServer('https://kubernetes.default.svc');

        return $config;
    }
public static function InClusterConfig()
    {
        $config = new Config();
        $config->setToken(file_get_contents('/var/run/secrets/kubernetes.io/serviceaccount/token'));
        $config->setCertificateAuthorityPath('/var/run/secrets/kubernetes.io/serviceaccount/ca.crt');
        $config->setServer('https://kubernetes.default.svc');

        return $config;
    }
public static function InClusterConfig ( ) { $ config = new Config ( ) ; $ config -> setToken ( file_get_contents ( '/var/run/secrets/kubernetes.io/serviceaccount/token' ) ) ; $ config -> setCertificateAuthorityPath ( '/var/run/secrets/kubernetes.io/serviceaccount/ca.crt' ) ; $ config -> setServer ( 'https://kubernetes.default.svc' ) ; return $ config ; }
Create a config based off running inside a cluster

@return Config
Create a config based off running inside a cluster